problem in function calling in javascript
function check()
{
if(document.form1.txt.value == "")
{
alert("User ID cannot be blank")
return
}
}
In the html page i have i have included it under the HEAD tag using the code:
<script type="text/javascript" src="indexcheck.js"></script>
in a form named as form1 i gave a button as:
<input type="button" name="Button" value="Submit" onClick="check()">
But my code is not working.
Can anybody tell me the proper code or can u please tell me how can i call a function written in another file on the occurring of an event.
please help me

