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 02-26-2003, 04:09 AM   PM User | #1
NinjaTurtle
Regular Coder

 
Join Date: Jun 2002
Posts: 358
Thanks: 2
Thanked 0 Times in 0 Posts
NinjaTurtle is an unknown quantity at this point
how to select a checkbox and all the drop down list set to the same?

dear,

how to select a checkbox and all the drop down list will auto select to same value with the first drop down list?

example:
<input type=checkbox name=checkall value="y" onclick="Selectall()">
Same All</p>
<p> First Site:
<select name="uom1" size="1">
<option value="1">Technology Sites1</option>
<option value="2">Technology Sites2</option>
</select>
</p>
<p> Second site:
<select name="uom2" size="1">
<option value="1">Technology Sites1</option>
<option value="2">Technology Sites2</option>
</select>
__________________
Thanks.
=====================================================
From NinjaTurtle
++http://ohmygoh.blogspot.com|http://technology.ohmygoh.com++
NinjaTurtle is offline   Reply With Quote
Old 02-26-2003, 06:14 AM   PM User | #2
glenngv
Supreme Master coder!


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
glenngv will become famous soon enough
if the order of items in uom1 correspond to the same order of items in uom2:

<script>
function Selectall(objChk){
if (objChk.checked){
objChk.form.uom2.selectedIndex = objChk.form.uom1.selectedIndex;
}
}
</script>
...
<input type=checkbox name=checkall value="y" onclick="Selectall(this)">
__________________
Glenn
_____________________________________________
Play Tower of Hanoi Android app (Ad-FREE!)
Play Tower of Hanoi Android app (FREE!)
Go to Tower of Hanoi Leaderboard
Play Tower of Hanoi Facebook app
glenngv 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 04:50 PM.


Advertisement
Log in to turn off these ads.