Results 1 to 2 of 2

Thread: radio button

  1. #1
    Join Date
    Mar 2004

    Unanswered: radio button

    hi everybody...
    i have problem with radio button
    in my page i have 2 radio button where one will be label as Aduan staff and enother one will be label as Aduan student. below the radio button there will be a textfield. if they click on the Aduan staff button, automatically the textfield will be written with Aduan staff but if they click on Aduan student the textfield will be empty. i have try some coding but it cannot work.can somebody tell me how to do this..pleaseee

  2. #2
    Join Date
    Oct 2003

    radio button

    Hai fisya, try the following

    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <script language="JavaScript">
    function addtext()
    if (
    document.test.Tname.value ="Aduan Staff";
    else if (
    document.test.Tname.value ="";



    <form name="test">
    <input type=radio name="name" value="Aduan Staff" onclick="addtext()">Aduan Staff
    <input type=radio name="name" value="Aduan Student" onclick="addtext()">Aduan Student<p>
    <input type=text name="Tname">


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts