Forum Moderators: open

Message Too Old, No Replies

Classic ASP and Postback

can't get values when input doesn't have name tag

         

humpg

3:07 am on Oct 10, 2008 (gmt 0)

10+ Year Member



I am posting a form back to the same page it is on but I am trying to use XHTML Strict 1.0 which doesn't allow the name attribute for the input tag.

When I post back i use the following to get the data

Request.Form( "txt_firstName" )

<input id="txt_firstName" type="text" size="40" />

If I switch id to name then I get the information.

What do I need to do to get the info using the id attribute?

humpg

3:54 am on Oct 10, 2008 (gmt 0)

10+ Year Member



Never mind

On closer inspection the name tag is allowed in form elements just not the form tag.

banging my head for hours for no reason.

GaryK

6:24 am on Oct 10, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Don't beat yourself up about it. It's all part of the learning curve. We've all spent a few wasted hours on stuff that later made sense. :)