F
frey
i have two parts of code here
this is a javascript:
function addThirdTierCategory(){
var length = document.form.selectedCategory.options.length
var maxNum=10;
if(length >= maxNum){
alert('maximum selection exceeded');
return;
}
....................................
.................................................
the second line:
var length = document.form.selectedCategory.options.length
if i need to change the select box name from
selectedCategory into selectedCategory[]
like the following html code
<td colspan="2"><select multiple="multiple" size="10"
name="selectedCategory[]">
</select></td>
so later i could submit this form to a php file then i can read the
multiple selections, the problem i am having now is the select box
named "selectedCategory[] " is part of the multielevel selection box
which works with javascript, if i change the name in javascript: which
is from
document.form.selectedCategory.options.length
into
document.form.selectedCategory[].options.length
it reports error,
any one can give me some advice on it? thank you very much!!
this is a javascript:
function addThirdTierCategory(){
var length = document.form.selectedCategory.options.length
var maxNum=10;
if(length >= maxNum){
alert('maximum selection exceeded');
return;
}
....................................
.................................................
the second line:
var length = document.form.selectedCategory.options.length
if i need to change the select box name from
selectedCategory into selectedCategory[]
like the following html code
<td colspan="2"><select multiple="multiple" size="10"
name="selectedCategory[]">
</select></td>
so later i could submit this form to a php file then i can read the
multiple selections, the problem i am having now is the select box
named "selectedCategory[] " is part of the multielevel selection box
which works with javascript, if i change the name in javascript: which
is from
document.form.selectedCategory.options.length
into
document.form.selectedCategory[].options.length
it reports error,
any one can give me some advice on it? thank you very much!!