A topic of concern in Linux

Darragh lists at digitaldarragh.com
Wed Jan 21 03:29:19 EST 2004


The sites that I write get a lot of feed back.  I find that the bigger the
form the more likely people will take short cuts while filling it in.  This
just makes sure they have to think a bit more while in the process.

Darragh
----- Original Message ----- 
From: "Sina Bahram" <sbahram at nc.rr.com>
To: "'Speakup is a screen review system for Linux.'"
<speakup at braille.uwo.ca>
Sent: Wednesday, January 21, 2004 1:49 AM
Subject: RE: A topic of concern in Linux


I have a question about email validation. Why do people bother? Don't get me
wrong, I'm not criticising, but I can easily pass the one you just
submitted, for example, by typing this in

test at blahBlah.com

And it's not your fault, I doubt I could write one that would be better,
unless if I had it go and actually do a reverse dns lookup realtime, which
sometimes is inefficient. So the question is, why in the world bother?

Take care,,
Sina

No trees were destroyed in sending this message; however, a large number of
electrons were terribly inconvenienced.

-----Original Message-----
From: speakup-bounces at braille.uwo.ca [mailto:speakup-bounces at braille.uwo.ca]
On Behalf Of Darragh
Sent: Tuesday, January 20, 2004 6:21 PM
To: davros at ycardz.com; Speakup is a screen review system for Linux.
Subject: Re: A topic of concern in Linux


Here are two common scripts that I use.

This doesn't stop users completely from right clicking on my site but it
certainly makes it more difficult.

<script LANGUAGE="JavaScript">
<!--var message="Sorry, You do not have permission to Right-Click on this
Page."; function click(e) {  if (document.all) {
  if (event.button == 2) {
   alert(message);
   return false;
  }
 }
 if (document.layers) {
  if (e.which == 3) {
   alert(message);
   return false;
  }
 }
}
 if (document.layers) {
  document.captureEvents(Event.MOUSEDOWN);
 }
document.onmousedown=click;

functions for validating a form. .
function echeck(str) {

  var at="@"
  var dot="."
  var lat=str.indexOf(at)
  var lstr=str.length
  var ldot=str.indexOf(dot)
  if (str.indexOf(at)==-1){
     alert("Invalid E-mail address")
     return false
  }

  if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
     alert("Invalid E-mail address")
     return false
  }

  if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 ||
str.indexOf(dot)==lstr){
      alert("Invalid E-mail address")
      return false
  }

   if (str.indexOf(at,(lat+1))!=-1){
      alert("Invalid E-mail address")
      return false
   }

   if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
      alert("Invalid E-mail address")
      return false
   }

   if (str.indexOf(dot,(lat+2))==-1){
      alert("Invalid E-mail address")
      return false
   }

   if (str.indexOf(" ")!=-1){
      alert("Invalid E-mail address")
      return false
   }

    return true
 }
function ValidateForm(){
 var emailID=document.Feedback.emailaddress

 if (Feedback.name.value == ""){
  alert("Please enter your name.  You must fill out fields marked with a
*");
  Feedback.name.focus();
  return;
 }

 if ((emailID.value==null)||(emailID.value=="")){
  alert("Please Enter your Email address.  Fields marked with a * must be
completed")
  emailID.focus()
  return false
 }
 if (echeck(emailID.value)==false){
  emailID.value=""
  emailID.focus()
  return false
 }
 return true
 }
//-->
</script>



_______________________________________________
Speakup mailing list
Speakup at braille.uwo.ca
http://speech.braille.uwo.ca/mailman/listinfo/speakup





More information about the Speakup mailing list