Results 1 to 3 of 3

Thread: concatenating a variable to my form name...should be easy...

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Posts
    537
    howdy,
    I am building a simple form from data out of a database.

    I need each form element to be named according to what record it is from.
    all i want to do it this:

    <input type=""radio"" name=yesNo & I & """" value=""yes"">

    I is a variable that is set to one(1) at the start of the loop. then I = I +1.(that is simple) what I am looking for is my form element name to look like this

    name=yesNo1
    and for each element in the form the name will just keep incrementing. I have the complete loop, every thing works how i would like EXECPT getting the names to increment.

    I end up with the browser print out just what you see up above. with the name=yesNo & I & part in there.
    ???

    I hope that makes sense. I think my problem is in my quotes " " " " but I can't get it to work......help.....

    if this you need me to refrase the question please ask
    thanks
    pnj

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    any help?

    Code:
    Response.write("<input type='radio' name='yesNo" & i & "' value='yes'>")
    Mark
    -------------------

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Posts
    537
    single quotes and double quotes.....aahhh....

    cool thanks mark.
    i ended up taking all the quotes out and that worked too but i
    do like to use quotes so i'll change it back to your suggestion.

    thanks again
    pnj

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