![]() |
checking file extensions. How can I change this?
Code:
function checkFileExtentions(form){ |
Looks like it will warn you every time. I'm no good at javascript but maybe do a check for something like:
if (file ext. doesn't equal jpg){ alert("error!"); } else { //carry on with upload or whatever... } sorry but I do not know the right js code to put in... |
Code:
// Returns true if the extension is invalid |
Thanks Salathe! That code of yours worked like a dream!
|
You're most welcome, I'm here to help. :)
|
The "jpg" and "jpeg" extensions can be merged into one alternation option, which should be faster.
Code:
/\.(jpe?g|png|gif|bmp)$/iCode:
/\.(?:jpe?g|png|gif|bmp)$/i |
| All times are GMT. The time now is 04:35 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0