iframe - submit form and open a new page

Discussion in 'HTML' started by Dario Zuffi, Oct 29, 2004.

  1. Dario Zuffi

    Dario Zuffi Guest

    Hello,

    I have a form embedded in a webpage with iframe.
    When I submit that form I get the result in the same iframe.

    But...
    I want to submit that form and display the result with "target=top" (a
    full page with the result). How can I do that?

    Thanks a lot for your help!

    Dario
    Dario Zuffi, Oct 29, 2004
    #1
    1. Advertising

  2. Dario Zuffi

    rf Guest

    Dario Zuffi wrote

    > Hello,


    G'day.

    > I have a form embedded in a webpage with iframe.


    Oh dear.

    > When I submit that form I get the result in the same iframe.
    >
    > But...
    > I want to submit that form and display the result with "target=top" (a
    > full page with the result). How can I do that?


    You would use target="_top".

    --
    Cheers
    Richard.
    rf, Oct 29, 2004
    #2
    1. Advertising

  3. Dario Zuffi

    Karl Core Guest

    "Dario Zuffi" <> wrote in message
    news:4181dd60$...
    > Hello,
    >
    > I have a form embedded in a webpage with iframe.
    > When I submit that form I get the result in the same iframe.
    >
    > But...
    > I want to submit that form and display the result with "target=top" (a
    > full page with the result). How can I do that?
    >
    > Thanks a lot for your help!
    >
    > Dario


    If you had gone and reviewed the HTML spec from the W3C, you'd know that
    'target' is a valid attribute for HTML 4.01
    http://www.w3.org/TR/html401/index/attributes.html


    -Karl
    Karl Core, Oct 29, 2004
    #3
  4. Dario Zuffi

    rf Guest

    Karl Core very wisely wrote:

    > "Dario Zuffi" <> wrote in message


    > > I want to submit that form and display the result with "target=top" (a
    > > full page with the result). How can I do that?


    > If you had gone and reviewed the HTML spec from the W3C, you'd know that
    > 'target' is a valid attribute for HTML 4.01


    This is very true. taget *is* a valid attribute. For transitional that is.

    --
    Cheers
    Richard.
    rf, Oct 29, 2004
    #4
  5. Dario Zuffi

    Steve Pugh Guest

    On Fri, 29 Oct 2004 08:04:30 +0200, Dario Zuffi
    <> wrote:

    >I have a form embedded in a webpage with iframe.
    >When I submit that form I get the result in the same iframe.
    >
    >But...
    >I want to submit that form and display the result with "target=top" (a
    >full page with the result). How can I do that?


    <form action="foo" target="_top">

    Note that target="top" creates a new window called top, whilst
    target="_top" uses the full existing window, replacing all framesets.

    I believe that some browsers have problems with target and iframes so
    check carefully in a range of browsers. Personally I would never put
    anything important (like a form) in an iframe.

    Steve
    Steve Pugh, Oct 29, 2004
    #5
  6. Dario Zuffi

    Mark Parnell Guest

    On Fri, 29 Oct 2004 06:35:36 GMT, rf <rf@.invalid> declared in alt.html:

    > This is very true. taget *is* a valid attribute. For transitional that is.


    And <spit type="disdainful">frameset</spit>.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
    Mark Parnell, Oct 29, 2004
    #6
  7. Dario Zuffi

    Neal Guest

    On Fri, 29 Oct 2004 06:35:36 GMT, rf <rf@.invalid> wrote:

    > This is very true. taget *is* a valid attribute. For transitional that
    > is.


    You forgot the r. R stands for 'rum and coke'...
    Neal, Oct 29, 2004
    #7
  8. Dario Zuffi

    Neal Guest

    On Fri, 29 Oct 2004 16:43:55 +1000, Mark Parnell
    <> wrote:

    > On Fri, 29 Oct 2004 06:35:36 GMT, rf <rf@.invalid> declared in alt.html:
    >
    >> This is very true. taget *is* a valid attribute. For transitional that
    >> is.

    >
    > And <spit type="disdainful">frameset</spit>.



    All transitional - and strict - markup is valid in frameset.

    Then again, playing runmmy and cross-stitching are allowed in prison. Go
    figure.
    Neal, Oct 29, 2004
    #8
  9. Dario Zuffi

    rf Guest

    Neal did slutter:
    > On Fri, 29 Oct 2004 06:35:36 GMT, rf <rf@.invalid> wrote:
    >
    > > This is very true. taget *is* a valid attribute. For transitional that
    > > is.

    >
    > You forgot the r. R stands for 'rum and coke'...


    Er, that'd be rum&coke but you are learning m'boy :)

    How did the martini party end up? Lois come?

    --
    Cheers
    Richard.
    rf, Oct 29, 2004
    #9
  10. Dario Zuffi

    rf Guest

    Neal misquoted:

    > All transitional - and strict - markup is valid in frameset.


    Er, no. The only things allowed in frameset are frame related things.

    Hint: validate your favourite non-frame page to frameset. You will find that
    the <body> element is invalid :)


    --
    Cheers
    Richard.
    rf, Oct 29, 2004
    #10
  11. Dario Zuffi

    Mark Parnell Guest

    On Fri, 29 Oct 2004 07:01:19 GMT, rf <rf@.invalid> declared in alt.html:

    > Er, no. The only things allowed in frameset are frame related things.


    I was talking about the frameset DTD, not the <frameset> element. and
    since Neal was replying to me, I assume he was too.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
    Mark Parnell, Oct 29, 2004
    #11
  12. Dario Zuffi

    Mark Parnell Guest

    On Fri, 29 Oct 2004 06:57:40 GMT, rf <rf@.invalid> declared in alt.html:

    > How did the martini party end up? Lois come?


    Neal's girlfriend is back, remember? Lois was a couple of days too late.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
    Mark Parnell, Oct 29, 2004
    #12
  13. Dario Zuffi

    Neal Guest

    On Fri, 29 Oct 2004 07:01:19 GMT, rf <rf@.invalid> wrote:

    > Neal misquoted:
    >
    >> All transitional - and strict - markup is valid in frameset.

    >
    > Er, no. The only things allowed in frameset are frame related things.
    >
    > Hint: validate your favourite non-frame page to frameset. You will find
    > that
    > the <body> element is invalid :)


    See http://www.w3.org/TR/html401/struct/global.html#h-7.2 :

    "The HTML 4.01 Frameset DTD includes everything in the transitional DTD
    plus frames as well."
    Neal, Oct 29, 2004
    #13
  14. Dario Zuffi

    Neal Guest

    On Fri, 29 Oct 2004 06:57:40 GMT, rf <rf@.invalid> wrote:

    > Neal did slutter:
    >> On Fri, 29 Oct 2004 06:35:36 GMT, rf <rf@.invalid> wrote:
    >>
    >> > This is very true. taget *is* a valid attribute. For transitional that
    >> > is.

    >>
    >> You forgot the r. R stands for 'rum and coke'...

    >
    > Er, that'd be rum&coke but you are learning m'boy :)


    All the same after a few.

    > How did the martini party end up? Lois come?


    Can only wish. But I'm a reluctant dog. And my girl's got amazing...
    attributes...

    Let's just say pixels are not an appropriate measurement...
    Neal, Oct 29, 2004
    #14
  15. Dario Zuffi

    rf Guest

    Neal parried:
    > On Fri, 29 Oct 2004 07:01:19 GMT, rf <rf@.invalid> wrote:
    >
    > > Neal misquoted:
    > >
    > >> All transitional - and strict - markup is valid in frameset.

    > >
    > > Er, no. The only things allowed in frameset are frame related things.
    > >
    > > Hint: validate your favourite non-frame page to frameset. You will find
    > > that
    > > the <body> element is invalid :)

    >
    > See http://www.w3.org/TR/html401/struct/global.html#h-7.2 :
    >
    > "The HTML 4.01 Frameset DTD includes everything in the transitional DTD
    > plus frames as well."


    Yeah well either the documentation is <horror> wrong </horror> or somebody
    should tell them that their validator is broken.

    Given the cloudy and sometimes misleading nature of the documentation I
    would prefer to believe the validator, although that too has its problems.

    I wonder what the other validators (non w3c) think? I *know* what the dtd
    says: no <body> element. It has been replaced by the <frameset> element.
    View the dtd here:
    view-source:http://www.w3.org/TR/html4/frameset.dtd
    Then again even the comments in there are a bit suss :)

    For your enjoyment validate
    http://users.bigpond.net.au/rf/tab.html
    result:
    <http://validator.w3.org/check?uri=http://users.bigpond.net.au/rf/
    tab.html>
    Validates to strict.

    Now validate
    http://users.bigpond.net.au/rf/tabframeset.html
    result:
    <http://validator.w3.org/check?uri=http://users.bigpond.net.au/rf/
    tabframeset.html>
    Objects to the <body> element.

    View source and <grin>verify</grin> that the only thing that is different is
    the doctype, specifying the strict or the frameset.dtd.

    --
    Cheers
    Richard.
    rf, Oct 29, 2004
    #15
  16. Dario Zuffi

    rf Guest

    Mark Parnell
    > On Fri, 29 Oct 2004 07:01:19 GMT, rf <rf@.invalid> declared in alt.html:
    >
    > > Er, no. The only things allowed in frameset are frame related things.

    >
    > I was talking about the frameset DTD, not the <frameset> element. and
    > since Neal was replying to me, I assume he was too.


    I too am talking about the frameset DTD. See my reply to Neal. The frameset
    DTD does *not* validate a <body> element in the document.

    --
    Cheers
    Richard.
    rf, Oct 29, 2004
    #16
  17. Dario Zuffi

    rf Guest

    Neal

    > > How did the martini party end up? Lois come?

    >
    > Can only wish. But I'm a reluctant dog. And my girl's got amazing...
    > attributes...
    >
    > Let's just say pixels are not an appropriate measurement...


    Points?

    --
    Cheers
    Richard.
    rf, Oct 29, 2004
    #17
  18. Dario Zuffi

    Neal Guest

    On Fri, 29 Oct 2004 07:49:54 GMT, rf <rf@.invalid> wrote:

    > Neal
    >
    >> > How did the martini party end up? Lois come?

    >>
    >> Can only wish. But I'm a reluctant dog. And my girl's got amazing...
    >> attributes...
    >>
    >> Let's just say pixels are not an appropriate measurement...

    >
    > Points?


    shape="hourglass"
    Neal, Oct 29, 2004
    #18
  19. Dario Zuffi

    Steve Pugh Guest

    On Fri, 29 Oct 2004 07:48:19 GMT, rf <rf@.invalid> wrote:

    > Mark Parnell
    >> On Fri, 29 Oct 2004 07:01:19 GMT, rf <rf@.invalid> declared in alt.html:
    >>
    >> > Er, no. The only things allowed in frameset are frame related things.

    >>
    >> I was talking about the frameset DTD, not the <frameset> element. and
    >> since Neal was replying to me, I assume he was too.

    >
    > I too am talking about the frameset DTD. See my reply to Neal. The
    > frameset
    > DTD does *not* validate a <body> element in the document.


    Yes it does. It just needs to be inside a <noframes> element which in turn
    needs to be inside a <frameset> element.

    Apart from the addition of the frame related elements and slight change to
    the content models to accomodate them the Frameset DTD is identical to the
    Transitional DTD. So (with the body correctly nested as outlined above)
    anything valid in Transitional is valid in Frameset. So the target
    attribute is valid in Frameset - though rather useless for the obvious
    reasons.

    Steve
    Steve Pugh, Oct 29, 2004
    #19
  20. Dario Zuffi

    rf Guest

    Steve Pugh sagely wrote:
    > On Fri, 29 Oct 2004 07:48:19 GMT, rf <rf@.invalid> wrote:


    > > The frameset
    > > DTD does *not* validate a <body> element in the document.

    >
    > Yes it does. It just needs to be inside a <noframes> element which in turn
    > needs to be inside a <frameset> element.


    Damn. A good point.

    I overlooked this as I have never actually coded a <noframes> element.

    I probably need to stand corrected :-(

    Oh well, shit happens.

    --
    Cheers
    Richard.
    rf, Oct 29, 2004
    #20
    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. Matt
    Replies:
    1
    Views:
    436
    Steven Burn
    May 29, 2004
  2. Daedalous
    Replies:
    3
    Views:
    682
    Daedalous
    Jan 16, 2004
  3. Targa
    Replies:
    1
    Views:
    160
    Randy Webb
    Jun 6, 2004
  4. Replies:
    0
    Views:
    805
  5. Replies:
    2
    Views:
    587
Loading...

Share This Page