Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 24th, 2011, 11:45 AM
Authorized User
Points: 222, Level: 4
Points: 222, Level: 4 Points: 222, Level: 4 Points: 222, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2007
Location: Phoenix, AZ, USA.
Posts: 48
Thanks: 4
Thanked 0 Times in 0 Posts
Default Javascript not executing

I am working on chapter 4's random number example. When I click the button, nothing happens. Here is the code:

%@PageLanguage="C#"AutoEventWireup="false"CodeFile="RandomNumber.aspx.cs"Inherits="RandomNumber" %

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<
head runat="server">
<title>Callback Page</title>
<script type="text/javascript">
function GetNumber()
{
UseCallback();
}

function GetRandomNumberFromServer(TextBox1, context)
{
document.forms[0].TextBox1.value = TextBox1;
}
</script>
</
head>
<
body>
<form id="form1"runat="server">
<div>
<input id="Button1" type="button" value="Get Random Number"
onclick="GetNumber()"/>
<br/>
<br/>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div>
</form>
</
body>
</
html>
__________________
Thomas G Magaro

Last edited by flashmanTom; May 24th, 2011 at 11:48 AM.. Reason: Incorrect formatting




Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing a JavaScript Function from XSL IronStar XSLT 5 July 8th, 2010 07:49 PM
Executing Javascript on Page_Load kulkarnimonica ASP.NET 2.0 Professional 2 August 10th, 2007 02:12 PM
AJAX, javascript not executing html code niklas JSP Basics 0 August 17th, 2006 04:27 AM
Executing from JavaScript C# functions see07 ASP.NET 1.x and 2.0 Application Design 1 March 1st, 2005 07:02 PM
executing programs marjanm PHP How-To 0 August 27th, 2004 06:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.