Results 1 to 9 of 9

Thread: Concatenate Text Fields? Simple Question Really

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263

    Concatenate Text Fields? Simple Question Really

    How do you concatenate the text in two text fields to pass in a form?
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  2. #2
    rsitogp
    Guest
    Excuse my ignorence (and spelling) but what do you mean by "to pass in a form"?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    I';m sorry. I didn't explain it as well as I should. I mean concatenate the text in two text fields. so when you Submit the form to a script it will be submited as one piece of imformation
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  4. #4
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    Could you create a hidden text field and then code some JS on each of the change events to set the hidden text = text1+text2.

    Just an Idea.

  5. #5
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    avariable = request.form("txtbox1") & request.form("txtbox2")
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    Cander,
    How can I assign that variable to a hidden text field?
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    Where do I put that variable in a hidden text field!!!!???
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    Ok. I have 2 textboxes and one hidden field in my form. I need to concatenate all of those into one hidden field to be submitted as one string to my script. This is the code that I have now. Can I please get some help?

    VB Code:
    1. <%
    2.     Dim myVar, Account, Date1, Amount
    3.    
    4.    
    5.     myVar =  Request.Form("Account") & Request.Form("Date1") & Request.Form("Amount")
    6. %>
    7.  
    8.     <INPUT TYPE="hidden" ID=TopicItemNamePrefix NAME=TopicItemNamePrefix VALUE="<%=myVar%>">

    What is the problem here??
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  9. #9
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602
    Please see your other post...My answer might help.


    Chris
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

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