Jump to content


Photo

Im bad with Radio buttons


  • Please log in to reply
3 replies to this topic

#1 chico1st

chico1st
  • Members
  • PipPipPip
  • Advanced Member
  • 60 posts

Posted 13 August 2006 - 10:37 PM

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

#2 toplancers

toplancers
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 13 August 2006 - 10:47 PM

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


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!

#3 chico1st

chico1st
  • Members
  • PipPipPip
  • Advanced Member
  • 60 posts

Posted 13 August 2006 - 11:17 PM

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

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
<input name="rnewtopic" id="rnewtopic" type="radio" value="true" /></td>

#4 chico1st

chico1st
  • Members
  • PipPipPip
  • Advanced Member
  • 60 posts

Posted 13 August 2006 - 11:47 PM

i figured out that radio button grouping thing.. im blaming dreamweaver :P




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users