Guest MrLeN Posted April 4, 2006 Share Posted April 4, 2006 I need to target an Iframe that is on a new page. ie:Page one has:<form method="post" action="cart.pl" target="cartframe">Page two has:<iframe src="cart.pl" width="100%" name="cartframe"></iframe> I can't use the action, because the action is already being used to submit information to cart.pl - However, I want that information to be displayed in n Iframe on a second page.Any ideas?MrLeN Quote Link to comment https://forums.phpfreaks.com/topic/6581-target-iframe-from-a-form/ Share on other sites More sharing options...
Vorotaev Posted April 7, 2006 Share Posted April 7, 2006 I may be mistaken, but I believe you can only specify a target that exists on the current page (or frameset, if frames are used), or a target such as _parent, _top, or _blank. What you might need to do is send the URL of the IFRAME to the second page via a form, and use a Javascript to catch and load the URL in the IFRAME when the page is loaded.-EDIT-Please note that you would absolutely want to validate any URL passed in such a fashion before loading it in an IFRAME. Javascript has a regex engine, that would be a good start. Quote Link to comment https://forums.phpfreaks.com/topic/6581-target-iframe-from-a-form/#findComment-24640 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.