3.2.0

how do I pass a variable to an inner html page?

Hi all,

I need to pass a variable from a parent html page to a child html page.

The parent page has a table, and when pressing an "add" button a new row in that table shall be added. Inside the added row is a <td></td> and inside the <td> cell is an iframe whose src is a html page.

My lack of knowledge stops me from passing a unique identifier to the newly added external html page.

I would like to be able to name a row in a table in this new html page using its "id" tag, such as <iframe id="myiframe"> where myiframe would be named "myiframe"+iterator (don't mix up this iframe with the one in the parent). The naming of the iframe's id tag must be done from the parent document so that the iterator corresponds to the row that is being added in the parent html page's table.

If I'd got it working the child html page's iframe would then have an id such as "myiframe1" or "myiframe2" or "myiframe3", and so forth.

The reason why I need help on this is because I want to collapse the parent html page's tablerow along with the collapsing of the child html page's tablerow leaving no empty space between the parent html page's tablerows. In practise the parent html page's tablerows would then be merged and the total height of the table would decrease.

I'm sure there are alternative ways I don't know of, or maybe a good solution for the scenario described, thanx for helpin!

Here's the relevant parent html page's code:

<!-- Code starts here -->

<table border="0" width="100%" height="100%" id="tblSample" cellpadding="0" cellspacing="0">
<tr>
<td><iframe src="../Photoshop/malFrame2.htm" width=100% height=400 frameborder=0 name="main"></iframe></td>
</tr>
</table>

<!-- Code ends here -->

Here's the relevant child html page's code:

<!-- Code starts here -->

<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="D4D0C9">
<tr>
<td bordercolor="#000000"><iframe src="../Mal for delvinduer til web - vinduskanter/features_content.html" width=100% height=400 frameborder=0 name="main" id="myiframe"></iframe></td>
</tr>
</table>

<!-- Code ends here -->

-where id="myiframe" should iterate depending on which row the child is added to in the parent html page's table.
Magnus
March 14,

This topic is archived.

See also:


Back to support forum