Here I have created two fields one is for first name and another is for last name. Now how can I access these fields in external Javascript file and validate them.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Validation</title>
</head>
<body>
<form action="something" method="post">
FirstName:<input type="text" name="fname"/>
LastName:<input type="text" name="lname"/>
<input type="submit" value="submit">
</form>
</body>
</html>
I want to validate both First and last name using external Javascript file. how can i take the values to external Javascript file and validate. Please give me suggestions.
Thanks in advance.**