V
Vinita Sharma
Hi All,
I have a strange problem. I have 2 text boxes and a button in my form. There
is a function called on onchange event of the first text box. There is
another function called on onclick event of the button. Things work fine if
you move from one field to another using tab keys. But if you change
something in the first text box and move to button using mouse, the onchange
event of the text box is called but the onclick event of the button is not
called.
Any help regarding this will be highly appreciated.
Below is my code:
<html>
<head>
<script type="text/javascript">
function myfunction1()
{
alert("Text Box")
}
function myfunction()
{
alert("Button button")
}
</script>
</head>
<body>
<form name = "myform" >
Some text
<input type = "text" name = "txtname" onchange = "myfunction1()">
<P>
Some text
<input type = "text" name = "txtname2" >
<P>
<input type="button" name = "btnsubmit"
onclick="myfunction()"
value="Call function">
</form>
</body>
</html>
Thank you,
Vinita
I have a strange problem. I have 2 text boxes and a button in my form. There
is a function called on onchange event of the first text box. There is
another function called on onclick event of the button. Things work fine if
you move from one field to another using tab keys. But if you change
something in the first text box and move to button using mouse, the onchange
event of the text box is called but the onclick event of the button is not
called.
Any help regarding this will be highly appreciated.
Below is my code:
<html>
<head>
<script type="text/javascript">
function myfunction1()
{
alert("Text Box")
}
function myfunction()
{
alert("Button button")
}
</script>
</head>
<body>
<form name = "myform" >
Some text
<input type = "text" name = "txtname" onchange = "myfunction1()">
<P>
Some text
<input type = "text" name = "txtname2" >
<P>
<input type="button" name = "btnsubmit"
onclick="myfunction()"
value="Call function">
</form>
</body>
</html>
Thank you,
Vinita