Hi. I hope you can help me.
My problem is probably a very simple one, but I can’t figure out how to solve it.
I’m working on my Weather App and I use standard bootstrap navbar with a simple text box and a button to submit it.
After some problems I realized that the was of type “submit” and every time I clocked it the whole web site reloaded and I was loosing global variables. After a few hours of struggling with that I realized what was happening. I changed the type of the button to “button” instead of “submit” and I could easily dealing with request, until…
I realized, that the input text box has got the same behaviour as the button element before. If I type in some text and instead of using the button to submit it I use “Enter” key on keyboard it reloads the web page. The page basically restarts. How I can change the behaviour so I can read the text using javascript/jquery?