Getting user's two word selection from a dropdown


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Getting user's two word selection from a dropdown

  1. #1
    Dave Guest

    Getting user's two word selection from a dropdown


    Hi all,

    I'm trying to pick up a user's selection from a simple selection box using
    a form:

    <Form <% Request.ServerVariables("Script_Name") %>" METHOD="POST">
    <SELECT name=browseType>
    <OPTION value="New Items">New Items</OPTION>
    <OPTION value="Old Items">New Items</OPTION>
    <INPUT TYPE=image src="image_files/Go.gif" NAME="Browse" VALUE="Browse">
    </form>

    However after posting only the first word is picked up for the variable -
    i.e. New or Old.

    dim browsetype
    browseType = Request.Form("BrowseType")

    Can anyone please explain to me why this is and how I can fix it.

    Many thanks in advance,
    Dave



  2. #2
    Simon Guest

    Re: Getting user's two word selection from a dropdown


    hi dave,
    you need to replace the space with "%20" like this:
    <OPTION value="New%20Items">New Items</OPTION>
    <OPTION value="Old%20Items">New Items</OPTION>

    "Dave" <webdev.@127.0.0.1> wrote:
    >
    >Hi all,
    >
    >I'm trying to pick up a user's selection from a simple selection box using
    >a form:
    >
    ><Form <% Request.ServerVariables("Script_Name") %>" METHOD="POST">
    ><SELECT name=browseType>
    ><OPTION value="New Items">New Items</OPTION>
    ><OPTION value="Old Items">New Items</OPTION>
    ><INPUT TYPE=image src="image_files/Go.gif" NAME="Browse" VALUE="Browse">
    ></form>
    >
    >However after posting only the first word is picked up for the variable

    -
    >i.e. New or Old.
    >
    >dim browsetype
    >browseType = Request.Form("BrowseType")
    >
    >Can anyone please explain to me why this is and how I can fix it.
    >
    >Many thanks in advance,
    >Dave
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center