On Fri, 07 Jan 2005 15:59:53 +1100, Lindsay Evans
<[EMAIL PROTECTED]> wrote:
> Keep in mind that a file named 'foo.txt.exe' would pass this test, a better 
> way would be:
> if(LCase(ListLast(form.file2, ".")) EQ "doc" OR LCase(ListLast(form.file2, 
> ".")) EQ "txt"){
> which just checks the file extension.

You don't need LCase() - eq is case-insensitive. listLast() is pretty
slow so the following would be 'better':

if ( right(form.file2, 4) is '.doc' or right(form.file2, 4) is '.txt' ) ...
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 5 invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to