Radio Event Not Registered

Discussion in 'Javascript' started by MC, Jul 22, 2008.

  1. MC

    MC Guest

    Question,
    Why does the following code register the event for input type button but not
    radio? (And how do I make this happen?)
    Thanks,
    MC

    <HTML>
    <FORM name='x' action=''>
    <input type='radio' name='rbTest' id='YES_1' value='1'>YES
    <input type='radio' name='rbTest' id='NO_1' value='0'>NO
    <input type='button' name='btnTest' id='btnTestid' value='test'>
    </FORM>
    <SCRIPT LANGUAGE="Javascript" type="text/javascript">
    document.x.btnTest.onclick = doTest;
    document.x.rbTest.onclick = doTest;
    function doTest(e) {
    alert('doTest');
    }
    </SCRIPT>
    </HTML>
    MC, Jul 22, 2008
    #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. Jen
    Replies:
    2
    Views:
    5,151
    mehrbod
    Feb 18, 2010
  2. =?Utf-8?B?SmVmZkRvdE5ldA==?=

    Writing to a registered source in the Application event log with I

    =?Utf-8?B?SmVmZkRvdE5ldA==?=, Jul 12, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    6,293
    =?Utf-8?B?SmVmZkRvdE5ldA==?=
    Aug 1, 2006
  3. PeterKellner
    Replies:
    0
    Views:
    554
    PeterKellner
    Jul 13, 2006
  4. TS
    Replies:
    12
    Views:
    1,316
  5. MC

    Radio Event Not Registered

    MC, Jul 22, 2008, in forum: Javascript
    Replies:
    3
    Views:
    109
    Thomas 'PointedEars' Lahn
    Jul 23, 2008
Loading...

Share This Page