Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-13-2005, 02:05 AM   PM User | #1
Taylor_1978
Regular Coder

 
Join Date: Jun 2003
Location: Australia
Posts: 528
Thanks: 8
Thanked 8 Times in 8 Posts
Taylor_1978 is on a distinguished road
onChange... make radio CHECKED

Okay.. I have looked around a bit to find what I'm looking for but can't (or more to the point I'm too buggered, 18 hours scripting and I'm over it!)

This is a simple thing I'm sure.. but I'm just a PHP-er.. thats my excuse and I'm sticking to it! lol

Here is what I want:

My form:

<table cellspacing=1 cellpadding=3 bgcolor=black width=95%>
<tr>
<td colspan=2 class=boxtitle align=center>Create Team</td>
</tr>
<tr><form method='post' name='regteam'>
<td class=tlist1 align=center><input type=radio name=newteam value=new CHECKED> Start New Team: <input type=text name=newtname maxlength=50 size=30><br/>
or<br/>
<input type=radio name=newteam value=join> Join A Team: <select name=jid>$jointeambox</select><br/><br/>
Team Password: <input type=text name=password maxlength=10>
</td>
</tr>
<tr>
<td colspan=2 class=boxtitle align=center><input type=submit name=submit value='Create Team'></td>
</form>
</tr>
</table>

NOTE: $jointeambox is my PHP variable of the options for select.

What I need is when someone changes the select box, that the radio button beside it becomes checked. I know I'll need onChange.. but not sure how to write whats needed to make the radio checked.

Thanks in advance for any help!
Taylor_1978 is offline   Reply With Quote
Old 07-13-2005, 02:40 AM   PM User | #2
Willy Duitt
Banned

 
Join Date: Sep 2003
Posts: 3,620
Thanks: 0
Thanked 0 Times in 0 Posts
Willy Duitt is an unknown quantity at this point
onchange="if(this.value)this.form['newteam'][1].checked=1;else this.form['newteam'][1].checked=0"
Willy Duitt is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:26 PM.


Advertisement
Log in to turn off these ads.