-
1. Re: IE submit bypasses action and navigation bug
ctomc Aug 24, 2008 11:30 AM (in response to lstine)Hi,
we have same problem. But problem occurs only in IE. If you hit enter it does not work. But if you click on button everything goes well. I am fixing that by adding javascript that checks if enter was pressed and then
clicks
on button..If anyone knows better solution I would also like to know...
cheers,
tomaz -
2. Re: IE submit bypasses action and navigation bug
danielc.roth Aug 24, 2008 8:09 PM (in response to lstine)In some cases, you could add a valueChangeListener to the inputText.
-
3. Re: IE submit bypasses action and navigation bug
lstine Aug 25, 2008 4:06 PM (in response to lstine)I finally pin-pointed the bug and have a decent hack.
Strangely enough, if the form in IE only has one input text field, then it will not fire an onclick event and will somehow submit the form
wrong
to seam. If I had any spare time, I would figure out what exactly it is doing wrong with the form submission.In any case, the easiest hack is to add another invisible text field to the form. IE is then happy enough to fire onclick events and submit correctly.
Try out this HTML to see this bug in action:
<form id="gohsAgency" name="gohsAgency" method="post" action="http://www.google.com" enctype="application/x-www-form-urlencoded">
<input id="gohsAgency:agencyName" type="text" name="gohsAgency:agencyName" value="hoho" maxlength="50" size="50" />
<input id="submit" type="submit" name="submit" value="submit with bug" onClick="return confirm('Are you sure that you would like to edit this Agency record?')" />
</form>Here is a form working as expected:
<form id="gohsAgency" name="gohsAgency" method="post" action="http://www.google.com" enctype="application/x-www-form-urlencoded">
<input id="g" type="text" name="g" value="hoho" maxlength="50" size="50" />
<input id="p" type="password" name="p" value="" />
<input id="submit" type="submit" name="submit" value="submit no bug" onClick="return confirm('Are you sure that you would like to edit this Agency record?')" />
</form>Making it work right with an invisible text input:
<form id="f" method="post" action="http://www.google.com" enctype="application/x-www-form-urlencoded">
<input id="g" type="text" name="g" value="hoho" maxlength="50" size="50" />
<input id="h" type="text" name="h" value="wow what a bug, this field has to be here" size="1" style="visibility: hidden"/>
<input id="submit" type="submit" name="submit" value="submit with hack" onClick="return confirm('Are you sure that you would like to edit this Agency record?')" />
</form>This is unbelievable. I never thought that I would be debugging internet explorer.