Hi All
I have a onload event which calls a function in Javacsript which has some logic to be executing.
I have a text box with search button, when clicked calls another function. This works fine if i click the button direclty. But when i press enter key, it calls the required function and then automatically calls the onload function. This is happening only in firefox, works in IE.
I'm not sure whats wrong with my code.
I have a onload event which calls a function in Javacsript which has some logic to be executing.
Code:
<body onload="display()">
function display()
{
my logic goes here which creates a html table based on query results
}
Code:
display += '<input type="text" id="quick_Code" size="15" name="Template" onkeydown=\"javascript:if((event.which && event.which == 13) || (window.event.keyCode && window.event.keyCode == 13)){document.getElementById(\'btnSearch\').click();return false;}else return true;\" />';
Comment