Post a seperate value in a dropdown list

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Stephane Landreville
    New Member
    • Aug 2010
    • 4

    #1

    Post a seperate value in a dropdown list

    Hi.

    Is it possible to post a dropdown value with the descriptor that follows:

    Example:
    <FORM name="State" action="state.a sp" method="POST">
    <select name="State_Pro v" size="1">
    <option value="1.05">Te xas</option>
    <option value="1.06">Fl orida</option>
    </select>
    </Form>

    ----
    strHTML = strHTML & "State: " & Request.Form("S tate_Prov") & "<br>"
    ----
    The value of State_Prov will be 1.05 if I selected Texas which is what I want for a javascript function that totals the state tax.

    But what I also require to see is the strHTML to return the actual state: Texas. I tried a couple of things, but to no avail.

    Steph
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Can you say value="1.05 Texas" and then split out the value programatically ?

    Jared

    Comment

    • Stephane Landreville
      New Member
      • Aug 2010
      • 4

      #3
      Hi Jared.

      Thanks for the reply.
      Well, that will work but I don't know how to do so.
      I thought of trying the split() function in Javascript but was unable to figure it out.

      What would you suggest I try?
      Steph

      Comment

      • jhardman
        Recognized Expert Specialist
        • Jan 2007
        • 3405

        #4
        I would do it in asp on the server side after posting.

        Jared

        Comment

        Working...