Modal form submit in IE9 workaround - add'l info for #566
A modal form consisting of modal-header, modal-body and modal footer.
form fields in modal-body, submit button in modal-footer. Works in FF, Chrome, Safari - does not work in IE9
Workaround #1: place submit button in modal-body (ugh) Workaround#2: change submit button to type=button and add an onclick event to document.modalform.submit()
I'm not quite sure why you are having this issue, but I am doing a form post from a modal and it works fine with IE9. Here's a snippet of one of mine that works:
<div id="create" class="modal hide" style="display: none;">
<div class="modal-header">
<a href="#" class="close">×</a>
<h3>
Title</h3>
</div>
<form action="/post/url" class="form-stacked" method="post" style="margin: 0; padding: 0;">
<div class="modal-body">
<label for="Name">Name</label>
<input autofocus="autofocus" id="Name" name="Name" type="text" value="" />
</div>
<div class="modal-footer">
<input type="submit" value="Add " class="btn primary" />
</div>
</form>
</div>
It was user error. I had the beginning form tag just inside the div for modal-body, after I followed your example and wrapped modal-body and modal-footer with the form tags it worked like a charm. Thanks so much.
The same problem but thanks to mkchandler for providing us a correct way. However, it makes more sense to me with BizSherpa way when I did just like BizSherpa from the first time.