Jump to content
  • 0

Parameter Passing Between Embedded Tabs


Gregstand
 Share

Question

I've been successfully passing parameters from a submission form, deployed as embedded in my web page, to a tab structure that contains several datapages for the results.  This tab structure (also deployed embedded) is based on nested iframes and was built using Caspios embedded tab interface  

 

So far so good.

 

Recently I modified the submission form by putting it in a tab structure with other submission form datapages.  But this time I used the Ajax approach suggested by Caspio (http://howto.caspio.com/tech-tips-and-articles/advanced-customizations/create-tabbed-navigation-for-multiple-datapages/) because I was told that this would be more reliable for passing parameters than using a second iframe embedded structure on the same web page.

 

So in summary I have submission form tabs (Ajax based), passing parameters to nested iframe tabs

Unfortunately the parameters which used to be passed are no longer being passed.

 

Any ideas?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 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...
 Share

×
×
  • Create New...