Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Re: CGI and JavaScript

by stuffy (Monk)
on Jun 03, 2001 at 03:51 UTC ( #85243=note: print w/replies, xml ) Need Help??

in reply to Re: CGI and JavaScript
in thread CGI and JavaScript

You are suggesting using it for form validation. That makes since, but do you worry about people that don't have it turned on? How do you handle that? If someone doesn't have javascript on, are they just out of luck? In that case have you lost out on someones buisness (or has whom ever hired you lost out on someones buisness?) I understand on high traffic sites it is probably a good thing, but what about a backup plan for the people that don't have it on?

by the way, there are cars designed for people that like to drive with bald tires, you can usually find them at the local drag strip :~)
update: corrected spelling

That's my story, and I'm sticking to it, unless I'm wrong in which case I will probably change it ;~)

Replies are listed 'Best First'.
Re: Re: Re: CGI and JavaScript
by thabenksta (Pilgrim) on Jun 04, 2001 at 09:27 UTC

    This can be solved by checking if the user has javascript enabled, if not, pass a hidden flag then have the cgi script do it. You could so something like this.

    HTML Form <form> <noscript> <input type="hidden" name="jsenabled" value="yes"> </noscript> </form> CGI Script if ($q->param('jsenabled') eq "Yes") { #perform validation }
    my $name = 'Ben Kittrell'; $name=~s/^(.+)\s(.).+$/\L$1$2/g; my $nick = 'tha' . $name . 'sta';

      You're trusting that input is from your form, and that your form has gone unedited. Clientside .*script is helpful, but is no substitute for good practice.

      After Compline,

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://85243]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (1)
As of 2021-10-17 01:19 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (70 votes). Check out past polls.