View Single Post
  #4 (permalink)  
Old February 18th, 2007, 08:44 PM
mat41 mat41 is offline
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

I mean really; how many of you people reading this post have javascript completley disabled? If so, is your web site also free of JS? This forum we all spend so much time on uses it along with most of the computing world, why is this? This is why we hire security experts and pay senior network guys so much money, they put things in place to stop JS reated intrusions.

For anybody who would like a client side solution, this one works a treat:

    function validate(formName,fieldName)
    {
       if ((/.(gif|jpe?g)$/i.test(document.[formName].[fieldName].value))==false)
       {
           alert('You may only upload .jpg, .jpeg, or .gif images (in case sensitive)');
           return (false);
       }
           return(true);
    }

Wind is your friend
Matt
Reply With Quote