Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can't submit a form that is in a non-displayed element

    I have a panel-like interface, where content is seperated in div's, with only 1 div being displayed at a time. The rest of them have 'display' set to 'none'. In one of those div's is an iframe, with a form in it that i want to submit via javascript.

    The problem is that in Firefox, if I am not currently viewing the div (panel) that has the iframe and form in it, then the submit will not work. I put traces in the code, and the submit code is getting executed, though the submission never actually takes place. This problem does not exist in IE.

    I can't find any info on the web about limitations of submitting forms that are not displayed. In fact, i know i can submit hidden forms quite easily, though this sitation is different from that, since i'm submitting a form that is in an iframe, which is in div that is not being displayed.

    Can anyone confirm this is a bug or help me have think of a workaround?

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Well if the form is to be hidden anyways why just use hidden form inputs on the page in the first place?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Aug 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The form is an iframe that may or may not be visible, depending on where the user is navigating. I can't take the form, or its inputs out of the iframe.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •