Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal form submit in IE9 workaround - add'l info for #566 #603

Closed
BizSherpa opened this issue Nov 10, 2011 · 3 comments
Closed

Modal form submit in IE9 workaround - add'l info for #566 #603

BizSherpa opened this issue Nov 10, 2011 · 3 comments

Comments

@BizSherpa
Copy link

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()

@mkchandler
Copy link

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>

@BizSherpa
Copy link
Author

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.

@effectjam
Copy link

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.

@twbs twbs locked and limited conversation to collaborators Aug 29, 2014
DocX pushed a commit to DocX/bootstrap that referenced this issue Sep 16, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants