I can't seem to figure why it will not return the file's name and extension.
It is suppose to return the XML file's name and extension in an alert message.
It appears that this part of the code is not working. I deduced this by just declaring an alert at the beginning of the called function (msg()), and with the onClick function of the button. The onClick function works, but the msg() is not being called or it doesn't know what to do.
function msg(var URL)
if (URL==null || URL=="" || !fileTypeParser(URL))
return('Please enter a XML file');
return('You have the wrong data type');
function fileTypeParser(var URL)
var array = URL.split(".");
<!-- This code is to simply out put the file's name and extension as an alert -->
<input type="file" name="libxml" accept="text/xml" />
<input type="button" value="Submit" onclick="alert(msg(document.forms["myForm"]["libxml"].value))"/>
Any help would be greatly appreciated.