Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:53 AM.


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