HighDots Forums  

Apply to all fields?

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss Apply to all fields? in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Event Horizon
 
Posts: n/a

Default Apply to all fields? - 11-08-2007 , 03:38 AM






I have a script that copy value from one "master" selectbox to all another selectboxes.
How I can add one master text field that can do the same to the another text fields?

<script type="text/javascript">
function applyToAll()
{
for (var i=0; i< document.MYFORMNAME.length; i++) {
document.MYFORMNAME[i].selectedIndex = document.MYFORMNAME.NAMEOFMAINSELECT.selectedIndex ;
}
}
</script>

Thanks in advanced,

-Event



Reply With Quote
  #2  
Old   
Event Horizon
 
Posts: n/a

Default Re: Apply to all fields? - 11-08-2007 , 06:55 AM







Oh, sorry...I figured it out myself...

-Event

Reply With Quote
Reply




Thread Tools
Display Modes

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

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.