I have an HTML page and and external JavaScript file.
How do I access the value of an input
tag from the HTML page in JavaScript? My HTML is as follows:
<form name="formxml">
<input type="text" name="xmlname"/>
<input type="submit" value="Click me please" onclick="loadxml()"/>
</form>
In the Javascript file, I was trying:
var name = document.formxml.xmlname.value
but this gives an error of "document.formxml is undefined"
What should I do?