Simple problem regardingform elements

Please support our ASP advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Jun 2003
Posts: 313
Reputation: red_evolve is on a distinguished road 
Solved Threads: 0
red_evolve's Avatar
red_evolve red_evolve is offline Offline
Posting Whiz

Simple problem regardingform elements

 
0
  #1
May 20th, 2004
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:
  1. <% =Request.Form("yyyy1") %>
However, when I tried to insert the value in =Request.Form("yyyy1") into a textfield in process.asp, it says
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.
Reply With Quote Quick reply to this message  
Join Date: Jun 2003
Posts: 313
Reputation: red_evolve is on a distinguished road 
Solved Threads: 0
red_evolve's Avatar
red_evolve red_evolve is offline Offline
Posting Whiz

Re: Simple problem regardingform elements

 
0
  #2
May 20th, 2004
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 1,135
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Solved Threads: 5
Team Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: Simple problem regardingform elements

 
0
  #3
May 21st, 2004
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...

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.

Originally Posted by red_evolve
  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.
Reply With Quote Quick reply to this message  
Join Date: Jun 2003
Posts: 313
Reputation: red_evolve is on a distinguished road 
Solved Threads: 0
red_evolve's Avatar
red_evolve red_evolve is offline Offline
Posting Whiz

Re: Simple problem regardingform elements

 
0
  #4
May 21st, 2004
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 32
Reputation: RobUK is an unknown quantity at this point 
Solved Threads: 1
RobUK RobUK is offline Offline
Light Poster

Re: Simple problem regardingform elements

 
0
  #5
Jul 13th, 2004
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.
Rob - DMOZ Editor
Web Design Forums - Free website critiques. Web design + SEO Advice
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC