Jump to content

javascript object help!


alena1347

Recommended Posts

Hello everyone,

I have a problem i have to change the option values in the code given below  and newOptions, newValues are also array's

how could i assign different values in this 

 

 

function changeSelect(fieldID, newOptions, newValues) {
  selectField = document.getElementById(fieldID);
  selectField.options.length = 0;
  for (i=0; i<newOptions.length; i++) {
    selectField.options[selectField.length] = new Option(newOptions, newValues);
}
}
Link to comment
https://forums.phpfreaks.com/topic/275308-javascript-object-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.