...

View Full Version : OnClick Button1



Philosophaie
07-03-2012, 10: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() {
code
}
</script>

sunfighter
07-03-2012, 05: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum