If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Value not carrying forward correctly

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-24-06, 17:35
pbaldy pbaldy is offline
Registered User
 
Join Date: May 2005
Location: Nevada, USA
Posts: 2,475
Value not carrying forward correctly

I've got a reservation form that is pretty much working properly, but has a quirk. I've got a couple of lines like this:

<p>Name of party:&nbsp; <input type="text" name="PassName" size="50" value = <% = request.form("Passname") %> > * </p>

The purpose (forgive me if I'm stating the obvious) is to carry forward the user's input if validation fails and they come back. It's working to a degree, but the quirk is that it will truncate the user input at the first space. In other words if I type

blah blah

and something causes the form to fail validation (they forgot to enter something else), I'll end up with

blah

in that field. I can type something longer, and it will still drop everything after the first space ("blahblahblah blah" will come back as "blahblahblah"). If the form submits correctly, the user input will go into the table correctly, so my assumption is that the problem is with the "value=..." bit.

Any ideas on why this is happening?

TIA
__________________
Paul
Reply With Quote
  #2 (permalink)  
Old 10-24-06, 18:21
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
Are you urlencoding your value? Depending on how your validation works, you might be choking on seeing " " where you need %20.

How does this validation of yours work?
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
  #3 (permalink)  
Old 10-24-06, 18:27
vich vich is offline
Registered User
 
Join Date: Oct 2006
Location: CA
Posts: 194
What happens when you put quotes around your ASP variable.

<p>Name of party:&nbsp; <input type="text" name="PassName" size="50" value = "<% = request.form("Passname") %>" > * </p>
Reply With Quote
  #4 (permalink)  
Old 10-24-06, 18:34
pbaldy pbaldy is offline
Registered User
 
Join Date: May 2005
Location: Nevada, USA
Posts: 2,475
I'm weak in html/asp, so bear with me. By the way, one thing I've noticed in testing is that the 4 input textboxes like that one all do this, but a textarea box does not.

Well, vich saved me having to paste my validation code. The quotes worked!

Thanks guys
__________________
Paul
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On