Akhilesh! Strange things are afoot in Request.Form

Results 1 to 7 of 7

Thread: Akhilesh! Strange things are afoot in Request.Form

  1. #1
    sarahj Guest

    Default Akhilesh! Strange things are afoot in Request.Form

    Hi Again,<BR>Okay- I got the value to go into a hidden input and I am now able to get the value from the asp page BUT! Now it adds a comma onto the end of the value when it gets placed into the SQL database. What could be causing this and is there any way around it? Here is my current code:<BR><BR>set rs2= Server.CreateObject ("adodb.recordset")<BR>rs2.Open "AucBids",conn,2,2<BR>rs2.AddNew <BR>rs2("BLotCode")=Request.Form("lotnumber")<BR>r s2("BDistributorCode")= rs("DSessionCode") <BR>rs2("BDate")=date<BR>rs2("BIDConfirmed")="yes" <BR><BR>rs2.Update<BR>rs2.Close<BR>rs.Close<BR>con n.Close <BR>Response.Redirect("done.htm") <BR><BR>Any help is appreciated!<BR>Sarah

  2. #2
    the other steve Guest

    Default RE: Akhilesh! Strange things are afoot in Request.

    Do a bunch of response.write(yourfunkyvariable) on both pages to see if you can pinpoint where the spurious comma originates. <BR><BR>If this wasn&#039;t helpful it&#039;s because I don&#039;t really know what I&#039;m doing.

  3. #3
    sarah j Guest

    Default Comma occurs in hidden input

    Not very helpful but I can give more information on the testing aspect: if the textfield isn&#039;t hidden there is no comma. Does anyone know about funky happenings with hidden input fields?<BR>Thanks!<BR>Sarah

  4. #4
    Join Date
    Dec 1969

    Default AKHILESH!!! HELP!!!

    i just saw a single mom and i don&#039;t know what to do!!!!

  5. #5
    Reggie Guest

    Default request.form() commas

    Check to make sure you don&#039;t accidentally have two form fields named the same thing. If you do, it will concatenate them with a comma and send it to the next page.<BR><BR>ex:<BR>&#060;input type="text" name="myfield" value="ham"&#062;<BR>...<BR>&#060;input type="hidden" name="myfield" value=""&#062;<BR><BR>Then request.form("myfield") will return "ham," instead of "ham"<BR>

  6. #6
    Join Date
    Dec 1969

    Default RE: Comma occurs in hidden input

    check to see if you haven&#039;t accidently named two fields the same. I usually see that happen when i&#039;ve accidently written 2 field names the same on the form page.

  7. #7
    sarah j Guest

    Default Thanks everyone! Page corrupt

    Thanks guys! I saved a new version and took the old ones off the server, it seems like the page was corrupt or something wacked. It works great now and at least I&#039;ll know what to do next tim eI get funky commas! :)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts