![]() |
|
|
+ Search |
![]()
|
Apr 4th, 2008 19:45
ha mo, Josh Twist, Felix Gonzalez, Darton Williams, BALAJI HARI,
I had the same problem using a INPUT FILE with IE5. The Onchange event
doesn´t do anything. It worked perfectly with IE6. So I founded that
the event Onfocus did the same. In both IE´s.
I used <input type="file" name="FileData"
OnFocus="javascript:fnChangeFile();"> and
function fnChangeFile(){
//Checks for a valid Excel file
var gfile
gfile=fsParameters.FileData.value
if (gfile=="")
return 0;
else if (gfile.indexOf(".xls")==-1)
{
//Reload this page
...
You can also use IE's onpropertychange event like so...
<input type="file" onpropertychange="if(event.propertyName=='value')
{alert('run code here');}">
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com