Connecting Tech Pros Worldwide Forums | Help | Site Map

Search Button Bug In IE 6?

Newbie
 
Join Date: Apr 2007
Posts: 3
#1: Apr 13 '07
I noticed a strange behaviour in IE 6. Not sure whether it's a bug in my code or because of IE 6. I have written a search function using a standard search input box and search button. (HTML input elements)

If someone types a keyword in the search input box and then click on the submit button, it works and correct results are displayed.

However, if someone types a keyword in the search input box and then press enter , it doesn't work. The keyword couldn't be passed by the POST method.

It happens on IE 6 but not on firefox, safari or opera. I could use javascript to sort it out but I want to make sure this is really a bug in IE 6 instead of my code.

Thanks

code green's Avatar
Expert
 
Join Date: Mar 2007
Location: England
Posts: 1,082
#2: Apr 16 '07

re: Search Button Bug In IE 6?


It depends how you are validating the submitted form. [PHP]i(isset($_POST['submit']))[/PHP] is fine if the user actually clicks the submit button. If enter is pressed then the 'submit ' variable is not set so the above test will fail.
Reply