Pass status of checkbox to new window

S

sjsean

While I have figured out how to pass the value of a checkbox to a new
window using javascript what I really need is to evaluate if the
checkbox is checked then set a variable to a certain value.

below is my starting example code.

<script type="text/javascript">
<!--
if (window.opener.document.form1.option1.checked);
var setting1 = "1";

document.write(setting1);

//-->
</script>

Code from parent page:

<xsl:if test = "Option1 !=''"><td style="text-align: right; white-
space: nowrap;"><input type= "checkbox" name="option1" id="option1"
value="{Option1}" /><xsl:attribute name="value"><xsl:value-of
select="Option1"/></xsl:attribute></td><td style="text-align:
left;"><xsl:value-of select="Option1"/></td></xsl:if>

Thanks for the help..or if you need additional information.

sean
 
S

SAM

sjsean a écrit :
below is my starting example code.

<script type="text/javascript">
<!--
if (window.opener.document.form1.option1.checked);
var setting1 = "1";

document.write(setting1);

//-->
</script>

And ?
that doesn't work ?

Code from parent page:

<xsl:if test = "Option1 !=''"><td style="text-align: right; white-
space: nowrap;"><input type= "checkbox" name="option1" id="option1"
value="{Option1}" /><xsl:attribute name="value"><xsl:value-of
select="Option1"/></xsl:attribute></td><td style="text-align:
left;"><xsl:value-of select="Option1"/></td></xsl:if>

to use xsl to produce a so laborious html code is a pity
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top