Jump to content
  • 0

JoennAquilino

Question

Hello,

I don't know if it's Wordpress issue but for some reason, whenever I deploy a datapage in iFrame, both wordpress code and html code, it wont receive any parameters however when using different deployment, it's working fine. 

 

Currently I deployed the datapage using the other means but I'd prefer using iFrame on some instances. 

 

Thank you.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
6 hours ago, JoennAquilino said:

Hello,

I don't know if it's Wordpress issue but for some reason, whenever I deploy a datapage in iFrame, both wordpress code and html code, it wont receive any parameters however when using different deployment, it's working fine. 

 

Currently I deployed the datapage using the other means but I'd prefer using iFrame on some instances. 

 

Thank you.

Hello,

This is not related to Wordpress deployment.

If you need to pass parameters , don't use iframe deployment method, since iframe is considered as a separate element on a webpage.

So Iframe is not an option if you need to pass parameters or redirect customer to another webpage after form submission, etc.

Link to comment
Share on other sites

  • 0

Hi - To pass URL query string parameter to an iFrame, you may do the following:

1. Add an id attribute on your iFrame, like add id="myiframe". The deployment code should be like this:
<iframe name="Some iFrame" title="Some iFrame" src="https://c1234567.caspio.com/dp/xxxxxxxxxxxxxxxxxxx" id="myiframe" >Sorry, but your browser does not support frames. Please, contact us.</iframe>

2. Once the id is added, copy and paste the code below in your webpage:

<script language="javascript">
var iframe = document.getElementById('myiframe');
iframe.src = iframe.src + window.location.search;
</script>

You can change the name of the iframe id depending on your preference.

What that code/script does is get the parameter query string of the current page and add the same query string to the iframe src.

Hope it helps!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...