I Love You Internet Explorer
The Project has this search form on the top of the page. The HTML looks like this:
<form action = "Search.do"> <input type = "text" name = "SearchTextBox"> <input type = "submit" name = "SearchButton" value = "Search"> </form>
Pretty standard stuff right? An input element and a submit button. The problem is that there’s only one input element. Apparently Internet Explorer doesn’t allow the Enter button to submit a form if there’s only one input element. WTF? OK no big deal just add a second (hidden) input field:
<form action = "Search.do"> <input type = "text" name = "SearchTextBox"> <input type = "text" style = "display: none"> <input type = "submit" name = "SearchButton" value = "Search"> </form>
Somehow I’m thinking this isn’t the most elegant solution out there but whatever… it works.
June 18, 2008 | Filed Under Browsers, I Should Really Use A Framework
Comments
Leave a Reply