PDA

View Full Version : Multiple select forms on the same page



amyy
05-06-2010, 12:25 PM
I would appreciate if someone could advise on how to modify the following codes so that I could have multiple select forms on the same page?

I have tried using selectform1 for the first and selectform2 for the 2nd..etc but it didn't work.


<form name=selectform action="" method=post><SELECT
style="COLOR: white; BACKGROUND-COLOR: blue"
onchange=setasxfile1(document.selectform.channel.options[document.selectform.channel.selectedIndex].value);
align=center name=channel> <OPTION selected> M T V</OPTION>

Many thanks in advance.

clueful
05-07-2010, 01:44 AM
<form name=selectform action="" method=post><SELECT
style="COLOR: white; BACKGROUND-COLOR: blue"
onchange="setasxfile1(this.value);"
align=center name=channel> <OPTION selected> M T V</OPTION> You're welcome in advance.

amyy
05-07-2010, 04:33 AM
Many thanks to Clueful for your kind response.

The code that you provided is for the 1st form, right?
Would appreciate if you could also provide the code for the 2nd, 3rd...etc forms on the same webpage.
I could not figure out which is the variable value.
Thank you very much.

clueful
05-07-2010, 11:16 AM
Many thanks to Clueful for your kind response.

The code that you provided is for the 1st form, right?
Would appreciate if you could also provide the code for the 2nd, 3rd...etc forms on the same webpage.
I could not figure out which is the variable value.
Thank you very much.The code applies to any <select> element calling that function.

djr33
05-07-2010, 01:22 PM
"this" is a special keyword that refers to the current item. So in general it doesn't need any special code. (of course in some scripts it's possible that it may need both 'this' and a specific reference)

amyy
05-07-2010, 02:49 PM
Many thanks to Clueful and Djr33 for your kind inputs.

I have tried and noticed that the video clips will not play and an exclamation mark appeared on the status bar (bottom left hand corner)if the 2 codes appended below are used for the same webpage.
It works fine if only one code is used.

Edited on 9 May 2010:
Since no response todate, it's ok. I have decided not to use this method.

Thanks to all for your kind attention.