Feb 8, 2002 #1 caseye IS-IT--Management Feb 7, 2002 52 US I am trying to sort an option box does anyone know haw to read the actual taxt and the value from the options[] Array..
I am trying to sort an option box does anyone know haw to read the actual taxt and the value from the options[] Array..
Feb 8, 2002 #2 starway Programmer Jan 15, 2002 1,010 UA document.formName.selectName.options.text and document.formName.selectName.options.value to access an option being selected use this: document.formName.selectName.selectedIndex to get number of options in <select> use this: document.formName.selectName.options.length Upvote 0 Downvote
document.formName.selectName.options.text and document.formName.selectName.options.value to access an option being selected use this: document.formName.selectName.selectedIndex to get number of options in <select> use this: document.formName.selectName.options.length
Feb 8, 2002 #3 starway Programmer Jan 15, 2002 1,010 UA sorry, [ i ] was "eaten"... document.formName.selectName.options[n].text and document.formName.selectName.options[n].value to access an option being selected use this: document.formName.selectName.selectedIndex to get number of options in <select> use this: document.formName.selectName.options.length Upvote 0 Downvote
sorry, [ i ] was "eaten"... document.formName.selectName.options[n].text and document.formName.selectName.options[n].value to access an option being selected use this: document.formName.selectName.selectedIndex to get number of options in <select> use this: document.formName.selectName.options.length
Feb 8, 2002 Thread starter #4 caseye IS-IT--Management Feb 7, 2002 52 US I have tried that Here was the syntax I used variable = document.form.selectbox.options[x] but when i go to write the variable all that is displayed is object. Upvote 0 Downvote
I have tried that Here was the syntax I used variable = document.form.selectbox.options[x] but when i go to write the variable all that is displayed is object.
Feb 9, 2002 #5 starway Programmer Jan 15, 2002 1,010 UA variable.text variable.value Upvote 0 Downvote
Feb 11, 2002 Thread starter #6 caseye IS-IT--Management Feb 7, 2002 52 US thank you Upvote 0 Downvote