I Have an HTML form that looks like this
<form action='<?php echo($_SERVER["PHP_SELF"]) ?>' method='post' name='demoform'>
file:<input type=file name=link1 id=lnk1>
Date:<input type=text name=me id=ee onFocus="opnexl(this.id,lnk1);">
file2::<input type=file name=link2 id=lnk2>
Date:<input type=text name=me id=aa onFocus="opnexl(this.id,lnk2);">
if (str == "")
document.getElementById(nam).value= "0000-00-00 00:00:00";
var oExcel = new ActiveXObject("Excel.Application");
var oWB = oExcel.workbooks.open(str);
The above code gives this error "document.demoform.lnks.value is null or not an object". I guess the problem is the Id of the link fields are not being passed to the opnexl function. Does anyone know how I can get this program to work?
Thanks for any help you can give.
Because lnks is a variable, you'll have to use an alternate notation
I tried it but it didn't work. I still get the same error only now it is
"document.demoform[...] is null or not an object" .
your passing lnk1 and lnk2 as an object and not as a string. The object is null since it doesn't exist in scope.
it'd probably be 10x easier to do:
Works great!! Thanks very much.
This topic is now closed. New replies are no longer allowed.