Categories
JavaScript

jsSelect – Multiple select value modifier

Last day I show you how to change the value of a select in html, but what if you need to change many at same time?

I did this function to handle it:

Demo | Download

function changeSelectValues(theController,theElements) {
	theElements = theElements.split(',');
	for(var z=0; z

In the first param, normally you would write this. Second parameter is a list delimited by coma (",") to specify from where you want to change the selects.

Example to change all the selects from a div call "selects":

Select forall in the div selects