开发者

Passing form variables offsite to an iframe

开发者 https://www.devze.com 2023-02-20 07:56 出处:网络
I have Site A, which has a form on it.That passes the form info via GET to another website, Site B.This works perfectly fine.

I have Site A, which has a form on it. That passes the form info via GET to another website, Site B. This works perfectly fine.

NOW, I want to send the form to an IFRAME located on Site B instead. So on Site A, I have the code:

<form method="get" action="http://<page with iframe on site B>" target="iframeName">

On the PAGE itself on Site B, I have THIS code:

   <iframe id="iframeName" src="<page that uses the passed variables>" name="iframeName" frameborder="0" noresize="noresi开发者_如何学Goze"> 
   </iframe> 

The PROBLEM is, the passed variables don't seem to get getting to the iframe. They appear in the URL of the PARENT of the iframe, but don't seem to get to the iframe itself.

I can NOT modify the site that loads in the iframe.

Why am I doing this? Just like on codecanyon when you view something, it has the bar at the top for the original page navigation.


Try to send the parameter on the Src, when you initiliaze the iframe ;)

   <iframe id="iframeName" src="<page that uses the passed variables>?PARAMETER=XXX" name="iframeName" frameborder="0" noresize="noresize"> 
   </iframe> 

So basically, retrieve the parameter from the site A by using a GET, and the initialize your iframe by passing these paramete.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号