www.webdeveloper.com
Results 1 to 2 of 2

Thread: Control Name Concatination with VBScript

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    42

    Control Name Concatination with VBScript

    Hi, I have a HTML form with several textboxes named txt1, txt2... txtX, Where X is unknown as the textboxes are generated using a loop
    <... name="txt<%=x%>">

    In vbscript, how can i concatinate the control names to get the textbox's values. For example:

    x = 1
    Do While ...
    val = txt & x & . value
    x = x + 1
    Loop

    One restriction, due to my application's structure, I cannot use arrays

  2. #2
    Join Date
    Nov 2007
    Location
    Ohio
    Posts
    308
    Something like this, if you are grabbing the values from a form post.
    PHP Code:
    Dim x:1
    Do
        If 
    val "" Then Exit Do
        
    val Request.Form("txt" x).value
        x 
    1
    Loop 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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



Recent Articles