View Full Version : OnClick Button1

07-03-2012, 11:49 AM
Why is this line code not accessing "JavascriptProgram()"

<asp:Button ID="Button1" OnClick="return JavascriptProgram();" Text="Get Answer" runat="server" />

The javascript program does not have any errors. The debug is flagging the Button1 button.

<script type="text/javascript">
function JavascriptProgram() {

07-03-2012, 06:06 PM
I know nothing about asp. But in HTML the button tag should be:

<button>Some Text</button> and not
<button />

If your checking things in IE. You might want to use
<input type="button" name="Button1" value="some text" onclick="JavascriptProgram();" /> because IE sucks.