Pass status of checkbox to new window

Discussion in 'Javascript' started by sjsean, Apr 5, 2008.

  1. sjsean

    sjsean Guest

    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
     
    sjsean, Apr 5, 2008
    #1
    1. Advertising

  2. sjsean

    SAM Guest

    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

    --
    sm
     
    SAM, Apr 5, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. saha
    Replies:
    0
    Views:
    4,140
  2. Shug
    Replies:
    13
    Views:
    922
    Philipp
    Dec 15, 2006
  3. Shug
    Replies:
    13
    Views:
    974
    Philipp
    Dec 15, 2006
  4. topmind
    Replies:
    1
    Views:
    358
    Bart Van der Donck
    Jul 1, 2006
  5. Ronen Yacov
    Replies:
    1
    Views:
    250
    David Dorward
    Nov 5, 2007
Loading...

Share This Page