Results 1 to 7 of 7

Thread: passing form variables truncates string

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374
    Hi all -

    I am trying to pass data between forms. But the line of code:
    Code:
    <input type="hidden" name="facility" value=<%=request.form("cmbFacility")%>>
    only submits the value of cmbFacility up to the first space (the rest is truncated).

    Why?!?

  2. #2
    Lively Member harsoni's Avatar
    Join Date
    Oct 2000
    Posts
    118

    Arrow

    try using

    code:--------------------------------------------------------------------------------
    <input type="hidden" name="facility" value=<%=request.item("cmbFacility")%>>
    --------------------------------------------------------------------------------

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374
    Nope, that did the same thing. What could the problem be, before I pull out all of my hair??

  4. #4
    Lively Member harsoni's Avatar
    Join Date
    Oct 2000
    Posts
    118
    cmbFacility is it a textarea???

    Sonia

  5. #5
    Addicted Member Active's Avatar
    Join Date
    Jan 2001
    Location
    Lat: 13° 4' 46" N, Long: 80° 15' 20" E
    Posts
    209
    Originally posted by DrewDog_21
    Hi all -

    I am trying to pass data between forms. But the line of code:
    Code:
    <input type="hidden" name="facility" value=<%=request.form("cmbFacility")%>>
    only submits the value of cmbFacility up to the first space (the rest is truncated).

    Why?!?
    should be

    Code:
    <input type="hidden" name="facility" value="<%=request.form("cmbFacility")%>">
    If you can't beat your computer at chess, try kickboxing !!!
    [Download Tag Editing Tools.]

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374
    cmbFacility is a Select box, and putting quotes around the value like Active suggested worked. Thanks!!

  7. #7
    New Member
    Join Date
    Apr 2001
    Location
    HYDERABAD
    Posts
    12
    before you send data to other page use this coding.
    this is must for every data if it contains any special characters

    <% username = server.urlencode(" hai hello ")%>
    <a href="nextpage.asp?username=<%=username%>">next</a>

    hope you will fine this bye..
    sagar

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