Hey guys
When I make a button in HTML and put some Java code in the "onclick" event. When I load the form, the code in "onclick" events gets executed, even though I have not clicked the button.
How come???
Here's the code
When I make a button in HTML and put some Java code in the "onclick" event. When I load the form, the code in "onclick" events gets executed, even though I have not clicked the button.
How come???
Here's the code
Code:
<BUTTON TYPE=button Value = "Click" ID=toggler ONCLICK="<%
DbRes sendID = dbc.executeSelectQuery(
"SELECT EMAIL_ADDR "
+ "FROM USER"
+ "WHERE user.id = 'tester'"
);
%>"> run this select statement
</BUTTON>
[\code]
and then when I click the button, the code doesnt run??? dont know why... even though the code is declared in "onclick" event it should run when I click the button.
Any thoughts??