To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.geekOpen lugnet.off-topic.geek in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Geek / 1483
1482  |  1484
Subject: 
Re: CGI question
Newsgroups: 
lugnet.off-topic.geek
Date: 
Fri, 7 Apr 2000 00:17:29 GMT
Highlighted: 
(details)
Viewed: 
178 times
  
Paul Foster wrote:
I have the following perl script that I inherited in
a program I am supposed to fix, the perl I understand,
but I'm not really up on Forms..
How can I check if the user has put data into the login field?

Reject it on the server end, and serve the form again with an appropriate error
message.  If you were using the CGI module (1), return an error if (for
example) $cgi->param("Vlogin") returns a blank string.

Oh, yeah.  And don't rely on Javascript if you don't have to.  Many people
(including myself) don't have it, or turn it off at the first opportunity.
(See why below.)

In lugnet.off-topic.geek, Dan Boger writes:
well, not sure how you can do it with java, but you shouldn't rely on
java for form validation anyhow - it's unreliable, and easily overcome.

Arg!  Pet peeve alert!  :-,

Java != Javascript.  One is a highly-structured and (IMO) relatively elegant
programming language, the other is a gaping security hole masquerading as
useless browser eye candy.  Aside from Netscape's bone-headed marketing
decision to name one after the other, they have extremely little to do with
each other.

Cheers,
- jsproat

1.  ...'cause that's what my experience is in...  :-,



Message has 2 Replies:
  Re: CGI question
 
(...) nod, exactly. (...) you're very correct, I'm sorry. I don't have much experience with either java or JS, so the two unknowns are very similar. I do know that java is a respectable language though :) Dan (25 years ago, 7-Apr-00, to lugnet.off-topic.geek)
  Re: CGI question
 
(...) Javascript story: I just came across someone the other day who was mad because he had to "covert all his equal signs into double-equals so they'd work with netscape". Hrm. Not exactly confidence-inspiring, that. (25 years ago, 7-Apr-00, to lugnet.off-topic.geek)

Message is in Reply To:
  Re: CGI question
 
(...) well, not sure how you can do it with java, but you shouldn't rely on java for form validation anyhow - it's unreliable, and easily overcome. If you had to, you could add another text field, in which case enter won't submit the form, and you'd (...) (25 years ago, 6-Apr-00, to lugnet.off-topic.geek)  

14 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR