iframe parent reloading problem in Firefox

Discussion in 'Javascript' started by effendi@epitome.com.sg, Oct 10, 2006.

  1. Guest

    I have a form containing an iframe. By default when the form load, the
    iframe is set to a blank page.

    I have a comments field for user to enter and this is submiited by a
    button which sends the comments to a field in anothe form via the
    iframe. This form is called comments form. The comments form is set to
    submit and it reloads the parents to display the comments.

    This works fine in IE. in FF, once the parent is reloaded, it calls the
    iframe again and I end up in an endless loops of submits.

    I have this code in the onLoad event of the comments form:

    function submitForm()
    {
    var thisForm=document.forms[0]
    thisForm.submit()
    alert("Your comments have been submitted successfully")
    parent.location.reload()
    }

    How do I solve this? Ideally when the parent reloads, it should be
    reloaded with the blank form which I doubt it does in Firefox.
     
    , Oct 10, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gustavo
    Replies:
    0
    Views:
    98
    Gustavo
    Aug 25, 2003
  2. Snolly

    Problem reloading parent window

    Snolly, Jan 19, 2005, in forum: Javascript
    Replies:
    2
    Views:
    122
    Snolly
    Jan 19, 2005
  3. Replies:
    0
    Views:
    94
  4. Replies:
    0
    Views:
    164
  5. KDawg44

    Reloading an iFrame inside an iFrame

    KDawg44, Jan 21, 2009, in forum: Javascript
    Replies:
    4
    Views:
    182
    Jorge
    Jan 22, 2009
Loading...

Share This Page