You guys friggin roxs!

I thought I didn't have the syntax right...just didn't know how to right
it correctly. And thanks for the help with the LCase thingo...didn't think
of that one. Saved my ass yet again..

J.



> Hi Jeremy,
> this would work:
> if (form.file2 CONTAINS '.doc' OR form.file2 CONTAINS '.txt'){
> 
> 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.
> 
> HTH.
> 
> Jeremy wrote:
> 
> >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.
> >
> 
> -- 
> Lindsay Evans, 
> Interface Developer, Red Square Productions
> http://redsquare.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