Title: RE: <html:image> doesn't submit the page in netscape???

Validations.js (in .txt format) is attached..

-----Original Message-----
From: Mark Lowe [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 11, 2003 4:37 PM
To: Struts Users Mailing List
Subject: Re: <html:image> doesn't submit the page in netscape???


Providing validations.js would also be useful..




On Friday, July 11, 2003, at 11:49 AM, sriram wrote:

> Firat
>
> The source is attached.
>
> Sriram
>
> -----Original Message-----
> From: Firat TIRYAKI [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 11, 2003 4:23 PM
> To: Struts Users Mailing List
> Subject: Re: <html:image> doesn't submit the page in netscape???
>
>
> check out the source in the browser. Would you please send it to
> here...
>
> F.
>
> ----- Original Message -----
> From: "sriram" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Friday, July 11, 2003 1:22 PM
> Subject: <html:image> doesn't submit the page in netscape???
>
>
> > I'm using <html:image> to submit a page.
> >
> > It works fine in IE, but not in Netscape 4.7.
> >
> > Did anybody face this issue before?
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>
> <source.txt>----------------------------------------------------------
> -
> ----------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

//Function to chk if browser is IE
function isIE()
{
        // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();
        var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
        if (is_ie)
        {
                return true;
        }
        else 
                return false;
}

//Function to validate email address
function isValidEmailAddress(emailAddress) {

if (emailAddress.indexOf("@") == -1) { return false; }
if (emailAddress.indexOf("@") == 0) { return false; } 
if (emailAddress.indexOf(".") == -1) {  return false; }
if (emailAddress.indexOf(".") > emailAddress.length - 4) { return false; }
if (emailAddress.indexOf("@") > emailAddress.lastIndexOf(".")) { return false; }
invalidChars = "!#$%^{}&amp;*()[]:;',?|~`\\/";
for (i=0; i<invalidChars.length; i++) {
if (emailAddress.indexOf(invalidChars.charAt(i)) != -1) 
{ return false; }
else 
{
return true
}
}
if (emailAddress.indexOf("<") >= 0) {
if (emailAddress.indexOf(">") == -1) { return false; }
if (emailAddress.indexOf(">") != emailAddress.length - 1) { return false; }
if (emailAddress.indexOf("\"") != 0) { return false; }

if (emailAddress.lastIndexOf("\"") == 0) { return false; }
if (emailAddress.indexOf("<") < emailAddress.lastIndexOf("\"")) { return false; }
} else {
if (emailAddress.indexOf(">") >= 0) { return false; }
}

return true
}

//Function to validate alphabets
function checkZip(val)
{ 
  var str="0123456789 "
  var found=false;
  var ch;
  for (i=0;i<=val.length;i++)
  {  ch=val.charAt(i);
    
  if(str.indexOf(ch)<0)
   {found=true;
     break;
    }
   
  }
   
  if (found==true)
  return false;
  else 
  return true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to