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 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    iframed form doesn't show alerts on IE

    hi,


    i have a form which onsubmit , it alerts the user with form errors.

    the form is placed inside an iframe.


    the alerts appear well on FF and chrome, but not on IE.

    how can i fix this ?

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,166
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    Show us your code.

    Because here is a demonstration to the contrary:

    *** FILE: demo.html ****
    Code:
    <html>
    <body>
    This is the main page.
    <br/><br/>
    <iframe src="iframe.html" style="width: 100%; height: 300px;"></iframe>
    <br/><br/>
    More main page
    </body>
    </html>
    *** FILE: iframe.html ****
    Code:
    <html>
    <body>
    This is iframe.html.
    <form onsubmit="alert('form submitted'); return false;">
    <input type="submit" value="Click here to submit the form"/>
    </form>
    </body>
    </html>
    It works just fine in MSIE.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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