943,568 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 5385
  • ASP RSS
May 20th, 2004
0

Simple problem regardingform elements

Expand Post »
Greetings.
I'm very new to asp and I encountered this little problem.
I have 2 files -> home.html & process.asp
In home.html, there are some input textfields.
In process.asp, I have inserted a textfield also.
I tried to post the form in home.html to process.asp. I managed to get the data with this little line:
ASP Syntax (Toggle Plain Text)
  1. <% =Request.Form("yyyy1") %>
However, when I tried to insert the value in =Request.Form("yyyy1") into a textfield in process.asp, it says
Quote ...
Error Type:
Microsoft JScript runtime (0x800A1391)
'service' is undefined
/chm/Calculator/process.asp, line 39
For your information, service is the textfield's name.
Please help.
Similar Threads
Reputation Points: 53
Solved Threads: 1
Posting Whiz
red_evolve is offline Offline
313 posts
since Jun 2003
May 20th, 2004
0

Re: Simple problem regardingform elements

Err, sorry guys, I think I've figured it out already.
Anyway, 1 more problem here: same scenario, 2 files -> home.html & process.asp
Is it possible for me to do the data validation in home.html after the user presses SUBMIT, any errors must be corrected before submitting the form again to process.asp?
P.s: process.asp is another pop-up window.
Reputation Points: 53
Solved Threads: 1
Posting Whiz
red_evolve is offline Offline
313 posts
since Jun 2003
May 21st, 2004
0

Re: Simple problem regardingform elements

Quote originally posted by red_evolve ...
Err, sorry guys, I think I've figured it out already.
Is it possible for me to do the data validation in home.html after the user presses SUBMIT
Yes, but you'd have to use JavaScript to read the values of the text field. Even if you did this, it would not be secure enough because I could create my own form and view it from my home computer, submitting directly to your process.asp, which leads to my next answer...

Quote originally posted by red_evolve ...
any errors must be corrected before submitting the form again to process.asp?
P.s: process.asp is another pop-up window.
Why don't you validate within process.asp? It's safer.

Quote originally posted by red_evolve ...
ASP Syntax (Toggle Plain Text)
  1. Error Type:
  2. Microsoft JScript runtime (0x800A1391)
  3. 'service' is undefined
  4. /chm/Calculator/process.asp, line 39
This error is strange. Are you using VBScript for your ASP page? If so, why does it give you a JScript runtime error? Do you have JScript running by default rather than ASP? Just curious.
Team Colleague
Reputation Points: 262
Solved Threads: 18
a.k.a inscissor
samaru is offline Offline
1,227 posts
since Feb 2002
May 21st, 2004
0

Re: Simple problem regardingform elements

Finally, I got a reply. I have done most of my coding, except for validation. I'm stuck! I am using ASP with jscript. The reason I do the client-side validation is because, based on what I have read about client-side validation, it's faster & only the correct data will be sent to the server to do further processing. Correct me if I'm wrong.
Err, I was using the Search feature provided by this forum & searched for
-> "client-side validation" & I got into the .NET Framework/ASP.NET forum. I realised that the problem posted there is similar to mine & so I posted my codes there. Would u mind checking it out over there? I apologize for the inconvenience.
Reputation Points: 53
Solved Threads: 1
Posting Whiz
red_evolve is offline Offline
313 posts
since Jun 2003
Jul 13th, 2004
0

Re: Simple problem regardingform elements

Actually, client side validation is a nice thing to use, but should NEVER be relied upon.

Consider those that have JavaScript turned off!! How will you validate then?

I always handle validation on the server, as it makes more sense. If you know there is an error in the input, you just load up the form again (and because this is server side, there is no javascript) and can also do clever things like highlighting the problem input element.
Reputation Points: 10
Solved Threads: 1
Light Poster
RobUK is offline Offline
32 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: ASP how to make the page not remembered in address bar?
Next Thread in ASP Forum Timeline: RDS Issue in Internet Explorer





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC