I’m trying to grab a file path from a form and pass it to hidden variable. To be honest I don’t quite remember why I did it this way, but it doesn’t matter since both the file element of the form and the hidden element after the passing get the full path in IE, and both get only the file name in Firefox.
Anyone know how I would get the full path in Firefox? We’re trying to get our users off of IE and onto Firefox so it wouldn’t make much sense to require IE on this report generator only.
This is the HTML section of the form…
[CODE]Export save location: <input name=”locationtemp” type=”file” size=’30’ id=’testid’ />
<br><br>
<input name=”locationfinal” type=”hidden” id=’testid2′ />
And this is the JavaScript which gets the path and passes it back to a the hidden variable. The “pname” part doesn’t have much to do with the problem, it is just a way to keep track of what page this stuff is being passed from.
[CODE]
function getlink(pname)
{
var pname = pname;
var newlink=document.getElementById(‘testid’);
newlink=newlink.value;
var newlink2=document.getElementById(‘testid2’);
newlink2.value=newlink;
var passpname=document.getElementById(‘pname’);
passpname.value=pname;
}