R
ray
i have a <input type=file> and trying to get the filename from user input.
i tried the following but doesn't seem to work.
function getFilename(s){
var fn = new String();
fn = s;
return fn.substr(fn.lastIndexOf("\\"), fn.length());
}
i think the single "\" from the file input box screw me up.
ray
i tried the following but doesn't seem to work.
function getFilename(s){
var fn = new String();
fn = s;
return fn.substr(fn.lastIndexOf("\\"), fn.length());
}
i think the single "\" from the file input box screw me up.
ray