Fixing single text input submit bug on IE7

Apparently, IE7 fails to submit the form with the default button if the form only contains one text input box. Here is the fix for that. Just create a text input in a hidden div on the page. This will circumvent the IE bug.

Example div:

    <!-- Fix for IE bug (One text input and submit, disables submit on pressing "Enter") -->
    <div style="display:none">
                <input type="text" name="hiddenText"/>
    </div>

Also see: http://stackoverflow.com/questions/270494/enter-button-does-not-submit-form-ie-only-asp-net

Linkbacks

Use the following URL for manually sending trackbacks: http://rigo.info/lib/plugins/linkback/exe/trackback.php/en:blog:fixing_single_text_input_submit_bug_on_ie7
en/blog/fixing_single_text_input_submit_bug_on_ie7.txt · Utolsó módosítás: 2009-04-14 00:00 (külső szerkesztés)
CC Attribution-Noncommercial-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0