if ((form.file2 CONTAINS '.doc') OR (form.file2 CONTAINS '.txt')){
        session.crw.file2 = '#Form.file2#';
       }
else{
       session.crw.file2 = '1';
}


Steve


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy
Sent: Friday, January 07, 2005 3:52 PM
To: CFAussie Mailing List
Subject: [cfaussie] <cfscript> Syntax

Heya,

Need some advise.I have the following code. 

 if (form.file2 CONTAINS '.doc') || (form.file2 CONTAINS '.txt'){
        session.crw.file2 = '#Form.file2#';
       }
else{
       session.crw.file2 = '1'
}

I'm thinking the CONTAINS is incorrect. I'm trying to check the extention
of the form file that is being uploaded before its uploaded. If they equal
the above set it. Otherwise make it 1.

Pretty simple I thought but I'm thinking its slighty off...as it doesn't
work.hehe

Anyway to make it work correctly.

Jeremy

---
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/


---
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