Re: JavaScript and RegEx not working on Safari...
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: JavaScript and RegEx not working on Safari...

From: RobG <rgqld@iinet.net.au>
Date: Fri Mar 31 2006 - 14:02:02 CEST

Ouch! wrote:
> Dear Mike, Spethan, and RobG:
>
> Thank you for all the replies. I will look over each post to see what
> my next steps are. Also, I may not have been 100% accurate w/ my
> original posting. Certian users, mainly MacOS users, see the alert
> message "Please try again, you tried to upload an invalid file type
> for CRITERIA 1" when uploading a valid file name such as myfile.doc.
> Users on Windows Platform using Mozilla and IE only see the alert
> message when they try to upload an invalid file format.

I've tested it now on Mac OS 10.2.8 and 10.4.5 and as I suspected, Mac OS,
being UNIX-based, has file paths like:

   /Users/fred/Documents/fred.doc

Your regular expression doesn't allow leading forward slashes - the same
thing will happen with other UNIX-based OSs like Linux I expect.

You can try to just test the extension (as suggested in my other post), but
that doesn't really check the file format anyway.

-- 
Rob
Received on Mon May 1 04:34:02 2006