Jump to content

Archived

This topic is now archived and is closed to further replies.

chico1st

Im bad with Radio buttons

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

Share this post


Link to post
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!

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

×

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.