Please help with interacting windows

Discussion in 'Javascript' started by Dmitri, May 5, 2005.

  1. Dmitri

    Dmitri Guest

    Here is my simplefied example, I need that when one of radio buttons
    is selected the color in original window of label "color" will became
    different color. Where is my mistake?
    here is code for window original window:

    <html>
    <head><TITLE>Help</TITLE>
    <script>
    var w;
    function f1()
    {
    w=open("color.html","window2");
    if(w.opener==null) w.opener=self;
    }
    </script>
    </head>
    <BODY>
    <font color="#FF0000" name="lol">color</font>
    <input type="button" value="new window" onClick="f1()">
    </BODY>
    </html>

    And here is code for second window:
    <html>
    <head><TITLE>Help</TITLE>
    <script>
    var w;
    function f2(form)
    {
    for(i=0;i<2;i++)
    {
    if(form.cc.checked)
    {
    break;
    }
    }
    opener.document.lol.color= form.cc.value;
    }
    </script>
    </head>
    <BODY>
    <form>
    <input type="radio" name="cc" value="#00FF00"
    onClick="f2(form)">GREEN!<br>
    <input type="radio" name="cc" value="#0000FF" onClick="f2(form)">BLUE!
    </form>

    </BODY>
    </html>

    Please help.
    Thanks in advance.
     
    Dmitri, May 5, 2005
    #1
    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. Timothy Parez

    Interacting with Windows Services

    Timothy Parez, Apr 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,801
  2. =?Utf-8?B?bGF4bWk=?=

    interacting windows application

    =?Utf-8?B?bGF4bWk=?=, Jun 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    362
    adnan boz
    Jun 8, 2004
  3. KK
    Replies:
    2
    Views:
    597
    Big Brian
    Oct 14, 2003
  4. Rayle
    Replies:
    2
    Views:
    300
    Mark Space
    Feb 9, 2007
  5. Allan Palmer

    Interacting with Windows Scheduler

    Allan Palmer, Jun 2, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    139
    ccallen
    Jun 7, 2004
Loading...

Share This Page