add a value to a select tag with a vbscript 
Author Message
 add a value to a select tag with a vbscript

Hello,

is it possible to add a value to a select tag with a VBScript.

Thanks Laurent

Example:

<form name="form1">
<SELECT name=>
   <OPTION selected value=valeur1>val1</OPTION>
   <OPTION value=2>val2</OPTION>
</SELECT>
<INPUT id=button1 name=button1 " type=button value=Add>
</form>

<script language="vbscript">
sub button1_onclick
  dim doc
  set doc=document
  doc.form1.select1.value.add("test")         THE RIGHT SYNTAX ??????
end sub

</script>



Tue, 15 Oct 2002 03:00:00 GMT  
 add a value to a select tag with a vbscript
Select Tag can be used alongwith Option to get the value


Quote:
> Hello,

> is it possible to add a value to a select tag with a vbscript.

> Thanks Laurent

> Example:

> <form name="form1">
> <SELECT name=>
>    <OPTION selected value=valeur1>val1</OPTION>
>    <OPTION value=2>val2</OPTION>
> </SELECT>
> <INPUT id=button1 name=button1 " type=button value=Add>
> </form>

> <script language="vbscript">
> sub button1_onclick
>   dim doc
>   set doc=document
>   doc.form1.select1.value.add("test")         THE RIGHT SYNTAX ??????
> end sub

> </script>



Tue, 15 Oct 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Add a value to a select tag

2. HOW to add VALUES to COMBOBOX (HTML SELECT)at run time on CLIENT SIDE using VBSCRIPT

3. Dynamically Adding to HTML's select tag (listbox)

4. Select tag values

5. Cancel value change in select tag?

6. syntax for adding a value to an option tag

7. Setting tag value on newly added treenode?

8. How to determine the selected option in a Select tag

9. VBscript command to add and select an html file on Active Desktop

10. Adding items to a select with Jscrip or vbscript

11. VBscript command to add and select an html file on Active DEsktop

12. Making a value selected in a select box.

 

 
Powered by phpBB® Forum Software