I have an error with the following page: http://jsbin.com/agedu/
Source code with comments: http://jsbin.com/agedu/edit
The problem is that when I type something and run a query to display the search results, if I return to the search page in my browser (Firefox 3.5, but this is the same with IE8), there are no more my search queries.
It is replaced by gray text. This gray text that I want to receive only when the text is not filled.
When I delete jQuery code, if I do a search and click the return button in my browser, the filled text is still present.
And even with this example page: http://mucur.name/system/jquery_example/
If I write some text, load another URL into the address bar, and then click the "Back" button, the filled text is still present, while it is not with my code.
So my question is: do you have an idea how to save this text when filling out?
There should be a way to determine if the input is full and avoid replacing the text if that is the case.
This may come from browsers and how they work with JavaScript, but I'm not sure about that.
source
share