Jump to content

Im bad with Radio buttons


chico1st

Recommended Posts

Okay I have a form and I have 2 radio buttons on it
Each radio button corresponds to a text box so I have a script that will check the buttons depending on which text box gets clicked
but I have 3 problems.
1) I need the script to go off if you tab in as well
2) I need the other radio button to get unchecked if you check one but that doesnt do itself.
3) I have an uncheck function that I can use but i dont know how to put 2 functions into 1 onclick trigger. And it seems taht if i use 2 onclick functions the 2nd one doesnt trigger.
Any help would be awesome
THANKS A TONNE

PS thanks for the help earlier corbin
Link to comment
Share on other sites

[quote]2) I need the other radio button to get unchecked if you check one but that doesnt do itself. [/quote]

if those buttons are placed in a single form, then no problem. can you show me some codes?

http://TopLancers.com
Professionals and Freelancers, Create your profile!
http://TopLancers.com/forum
Join in our forum today!
Link to comment
Share on other sites

This is the 1st radio button
[b]      <input name="rextopic" id="rextopic" type="radio" value="true" /></td>[/b]

then i ahve some php
<?php
$query = "SELECT topicID, name FROM topic";
$output = "<td><select name='extopic' id='extopic' onClick=check('rextopic');>";
$result = mysql_query($query, $dbConn);
while($row = mysql_fetch_assoc($result)){
$output .= "<option selected='$row[topicID]'>$row[name]</option>";
}
$output .= "</select></td>";
print $output;
?>
    </tr>
  <tr>
    <td>New Topic
     
here is the second radio
[b]<input name="rnewtopic" id="rnewtopic" type="radio" value="true" /></td>[/b]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.