472,119 Members | 1,825 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

break out of an iframe during a form submission

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

May 9 '07 #1
2 11410
Lee
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.
--

May 9 '07 #2
>
Nothing to do with Javascript.
Add the target="_top" attribute to the form tag.

--
Yow, that was simple ;') thanks.

Jim

May 9 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by doug | last post: by
3 posts views Thread by Tom Szabo | last post: by
2 posts views Thread by Robert Oschler | last post: by
1 post views Thread by acemtp | last post: by
3 posts views Thread by chico | last post: by
3 posts views Thread by CAG | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.