#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    3
    Rep Power
    0

    Parse dynamically generated text input box with vbscript


    Hey,
    Basically have a number of text box rows generated dynamically with the same name. This gets posted to the same page as a comma delimted string.
    The Problem: If a user enters a comma the string gets disjointed.
    Need to parse(remove commas)the dynamic text box values generated on client side.

    Any Idea how to do it?
    Cant seem to find any simply laid out method...
    prefer vbscript client side solution only.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Location
    Shimonoseki / JAPAN
    Posts
    58
    Rep Power
    12
    Try this:
    Code:
    newString = Replace(userString,","," ")
    This will replace all [,] chars with spaces...
    Sweet smell of a great sorrow lies over the land. Plumes of smoke rise, merge into the leaden sky. A man lies and dreams of green fields and rivers, but awakes to a morning with no reason for waking. He's haunted by the memory of lost paradise. In his youth or dream, he can't be precise. He's chained forever to a world that's departed. It's not enough, it's not enough.
    Gilmour
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    3
    Rep Power
    0

    hey buraque


    I tried the replace function still doesnt work...

    the html part...

    <input type="text" name="fromcity" size="3" maxlength=3 tabindex="<%=taborder%>" value="<%
    dim newstr,newstr2
    newstr=oRs("fare_depart_city")
    newstr2=replace(newstr,","," ")
    response.write UCase(newstr2)%>"

    This is the asp server part

    fromcity=trim(Request.Form("fromcity"))
    whenevr i input a comma in the dynamically generated row....
    the string gets disjointed...
    thanx texter

IMN logo majestic logo threadwatch logo seochat tools logo