Jump to content
  • 0

Passing Id Parameter To Tab



Thanks in advance.  This is a school/classroom application.  I have a search result set for Students.  On the result table, I have an HTML block with the following:   <a href="https://b6.caspio.com/dp.asp?AppKey=7e4d30007043f4ce0dc44c099960&Student_ID=[@field:Students_Student_ID]">Edit in Tab</a>


I then have a HTML Datapage.  This datapage holds 3 tabs, including a separate Student EDIT datapage inside Tab 1.


How do I get the Student ID passed from the search result above into the ID parameter needed inside Tab 1 for the student edit?


Thx again, Matt

Link to comment
Share on other sites

3 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;

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.

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.

  • Create New...