Results 1 to 3 of 3

Thread: <select> / <option> problem

  1. #1

    Thread Starter
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    I've tried to do a really easy peasy example of what I'm trying below.
    Could you please take a look and correct me where I'm going wrong please ?

    Thanks !
    Attached Files Attached Files

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    never fear HTML man is here! LOL

    use this

    Code:
    <html>
    
    <head></head>
    
    
    <script language="vbscript">
    Sub Button1_OnClick
    	MsgBox "The Value selected from the combobox is " & document.Form1.IDCar(document.Form1.IDCar.selectedIndex).value
    End Sub
    </script>
    
    <body>
    <input type="button" value="click me" name="button1">
    
    <br><br>
    <form Name="Form1">
    	<select Name="SelCar" ID="IDCar">
    	<option value="Mini">Mini</option>
    	<option value="Mini Metro">Mini Metro</option>
    	<option value="Metro">Metro</option>
    	</select>
    </form>
    </body>
    
    </html>
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    Excellent, thanks once again Chris - works great!

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width