how to submit iframed form to top or whole window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sharkie

    how to submit iframed form to top or whole window

    I have a document with couple of iframes. One of the iframes has a
    simple form. When this form is submitted
    I would like to display the results in whole (top) window as opposed
    to just in the originating iframe.

    Form is submitted to a servlet which returns new html page.

    How can this be done?

    In case of links I can do this by either specifying "_top" target, or
    this onclick handler:
    top.location=th is.href;return false;

    Works perfectly, but I can't make it work for form submit. I tried
    executing this:
    top.location=se lf.location;

    both before the form submit and after, but neither works. I mean the
    iframe does open in whole window,
    but if executed before the submit, form will never get submitted, and
    after the submit I lose the results.

    Any help much appreciated.
  • Thomas 'PointedEars' Lahn

    #2
    Re: how to submit iframed form to top or whole window

    Sharkie wrote:
    In case of links I can do this by either specifying "_top" target,
    As you can with forms.




    PointedEars
    --
    realism: HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness: XHTML 1.1 as application/xhtml+xml
    -- Bjoern Hoehrmann

    Comment

    • Sharkie

      #3
      Re: how to submit iframed form to top or whole window

      On May 23, 2:21 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
      wrote:
      Sharkie wrote:
      In case of links I can do this by either specifying "_top" target,
      >
      As you can with forms.
      >
      http://www.w3.org/TR/html401/interac...html#edef-FORM
      Thanks, didn't know that. I actually searched for "_top" in the above
      document,
      didn't find it, and thought it's not supported.

      Should have searched for "target" instead...

      Comment

      Working...