break out of an iframe during a form submission

Discussion in 'Javascript' started by cybervigilante, May 9, 2007.

  1. I have a table inside an iframe that has paypal buttons in table
    cells. Each button is a Form. (The table has to be in an iframe to
    protect it from a containing CMS, which buggers the forms otherwise)

    When I click on one of the buttons I go to paypal, but the resulting
    PayPal page is still inside the iframe and too small, so you have to
    scroll. I need to get out of the iframe but still go to paypal. What
    is the javascript I'd use? I assume I need to place some extra
    javascript inside the action= "" quote and chain it so it comes back
    to the form submission after breaking out of the frame, but my head is
    spinning thinking about it. Here is the form

    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="me.com">
    <input type="hidden" name="item_name" value="Zillion Dollars">

    etc
     
    cybervigilante, May 9, 2007
    #1
    1. Advertising

  2. cybervigilante

    Lee Guest

    cybervigilante said:
    >
    >I have a table inside an iframe that has paypal buttons in table
    >cells. Each button is a Form. (The table has to be in an iframe to
    >protect it from a containing CMS, which buggers the forms otherwise)
    >
    >When I click on one of the buttons I go to paypal, but the resulting
    >PayPal page is still inside the iframe and too small, so you have to
    >scroll. I need to get out of the iframe but still go to paypal. What
    >is the javascript I'd use? I assume I need to place some extra
    >javascript inside the action= "" quote and chain it so it comes back
    >to the form submission after breaking out of the frame, but my head is
    >spinning thinking about it. Here is the form
    >
    ><form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    > <input type="hidden" name="cmd" value="_xclick">
    > <input type="hidden" name="business" value="me.com">
    > <input type="hidden" name="item_name" value="Zillion Dollars">


    Nothing to do with Javascript.
    Add the target="_top" attribute to the form tag.


    --
     
    Lee, May 9, 2007
    #2
    1. Advertising


  3. >
    > Nothing to do with Javascript.
    > Add the target="_top" attribute to the form tag.
    >
    > --


    Yow, that was simple ;') thanks.

    Jim
     
    cybervigilante, May 10, 2007
    #3
    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. Replies:
    12
    Views:
    968
  2. Jared
    Replies:
    5
    Views:
    212
    Jared
    Jul 10, 2003
  3. boyscout

    PLEASE How to break out of an iframe?

    boyscout, Oct 20, 2003, in forum: Javascript
    Replies:
    1
    Views:
    101
    kaeli
    Oct 21, 2003
  4. Daedalous
    Replies:
    3
    Views:
    705
    Daedalous
    Jan 16, 2004
  5. Replies:
    4
    Views:
    135
Loading...

Share This Page