problem with radio buttons

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pavani1
    Banned
    New Member
    • Mar 2008
    • 4

    problem with radio buttons

    Hi,


    I run the below code like i have two radio buttons. one is automatic,anoth er is manual button.when i select the the automatic radio button it move to the page.php and select the manual radio button it move to the page2.php.But it is not work.plz tell that what's the problem in my code.


    [HTML] <html>
    <head>
    <SCRIPT LANGUAGE="JavaS cript">
    function showList() {
    sList = window.open("pa ge.php", "update");
    }
    function show() {
    sList = window.open("pa ge2.php", "update");
    }
    function remLink() {
    if (window.sList && window.sList.op en && !window.sList.c losed)
    window.sList.op ener = null;
    }
    </SCRIPT>
    </head>
    <body>
    <form action=link method="reg_upd ated_msg.html" name="stockForm ">
    <input type="radio" name="stockBox" onClick="showLi st(this.value)" checked id="id11" value=""/> Automatic registration approval via
    email<br>
    <input type="radio" name="stockBox" onClick="show(t his.value)"id=" id22"/> Manual registration approval by
    administrator<b r>
    </form>
    </body>
    </html>[/HTML]
    Last edited by gits; Mar 31 '08, 09:29 AM. Reason: added code tags
  • abhishekbrave
    New Member
    • Dec 2007
    • 79

    #2
    Originally posted by pavani1
    Hi,


    I run the below code like i have two radio buttons. one is automatic,anoth er is manual button.when i select the the automatic radio button it move to the page.php and select the manual radio button it move to the page2.php.But it is not work.plz tell that what's the problem in my code.


    [HTML] <html>
    <head>
    <SCRIPT LANGUAGE="JavaS cript">
    function showList() {
    sList = window.open("pa ge.php", "update");
    }
    function show() {
    sList = window.open("pa ge2.php", "update");
    }
    function remLink() {
    if (window.sList && window.sList.op en && !window.sList.c losed)
    window.sList.op ener = null;
    }
    </SCRIPT>
    </head>
    <body>
    <form action=link method="reg_upd ated_msg.html" name="stockForm ">
    <input type="radio" name="stockBox" onClick="showLi st(this.value)" checked id="id11" value=""/> Automatic registration approval via
    email<br>
    <input type="radio" name="stockBox" onClick="show(t his.value)"id=" id22"/> Manual registration approval by
    administrator<b r>
    </form>
    </body>
    </html>[/HTML]
    I don't think there is any error in your code.
    Check the location of the file that you are giving in window.open().
    And what is the use of fucntion remLink() it is not used in code.

    Comment

    • vee10
      New Member
      • Oct 2006
      • 141

      #3
      Hi,

      ur code is working but the problem is when page is loaded the automatic check box is checked so instead making it checked make is unchecked or
      on loading since it is checked open that window.
      Last edited by gits; Mar 31 '08, 09:30 AM. Reason: removed quote

      Comment

      Working...