| Author |
problem in photo upload in IE7 and mozilla by using javacsript
|
manohar penumarthi
Greenhorn
Joined: Sep 25, 2008
Posts: 2
|
|
function uploadForm() { document.forms[0].cmpLogo.value = document.forms[0].companyLogo.value; if (fileTypeCheck() == false) { return false; } document.forms[0].compLogo.src = document.forms[0].companyLogo.value; } function fileTypeCheck() { var reOkFiles=/\.(jpg|JPG|jpeg|JPEG|gif|GIF)$/i; if(document.forms[0].companyLogo.value != "") { var fileStr =document.forms[0].companyLogo.value; if(!reOkFiles.test(fileStr)) { alert("Please upload only jpg, jpeg or gif file formates"); return false; } } }
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56218
|
|
|
And?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
You can not set an image to the source of a local image file. Eric
|
 |
 |
|
|
subject: problem in photo upload in IE7 and mozilla by using javacsript
|
|
|