javascript - I'm getting 0 results in my search whenever i have the search input area prefilled -


i'm having trouble getting search results in form whenever use js pre-fill input field. wondering if workaround this.

i'm using code -

value="keywords" onfocus="if (this.value == 'keywords') {this.value = '';}" onblur="if (this.value == '') {this.value = 'keywords';}" /> 

thanks!

whatever issue is, related other code have not yet shared (without seeing how you're processing form, can speculate might causing problem).

below jsfiddle example shows code posted works perfectly. proof else in code causing error. http://jsfiddle.net/pulas/

i recommend taking hard @ server side code you're using read , process form, culprit in there.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -