Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 4th, 2010, 05:25 AM
Authorized User
 
Join Date: Jun 2007
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Empty web page when using Jquery in markup

I have this code in the designer:

Code:
<%@PageLanguage="C#"AutoEventWireup="true"CodeBehind="Default.aspx.cs"Inherits="WebApplication8._Default" %>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headid="Head1">
<title>Untitled Page</title></head>
<bodyrunat="server">
<scripttype="text/javascript"src="../jquery-1.2.6-vsdoc.js"/>
<scripttype="text/javascript"src="../jquery-1.2.6.min.js"/>
<scripttype="text/javascript"src="../jquery-ui-1.6.custom.min.js"/>
<scripttype="text/javascript"src="../jquery.blockUI.js"/><divid="di">
<tableid="tblCurrent"runat="server">
</table>
<inputtype="button"id="B"value="abc"onclick="$.blockUI();document.getElementById('unbloc').style.visibility = 'visible';"/>
</div>
<divid="unbloc"style="visibility: hidden">
<inputtype="button"id="Button1"value="bbbb"onclick="$.unblockUI();"/>
</div>
</body>
</html>
And this in the code behind

Code:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace WebApplication8
{
publicpartialclass_Default : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
HtmlTableRow tr = newHtmlTableRow();
HtmlTableCell td = newHtmlTableCell();
td.NoWrap = true;
td.Controls.Add(newLiteralControl("ABC"));
tr.Controls.Add(td);
tblCurrent.Controls.Add(tr);
td.Controls.Add(newLiteralControl("DEF"));
tr.Controls.Add(td);
tblCurrent.Controls.Add(tr);
td.Controls.Add(newLiteralControl("GHI"));
tr.Controls.Add(td);
tblCurrent.Controls.Add(tr);
td.Controls.Add(newLiteralControl("JKL"));
tr.Controls.Add(td);
tblCurrent.Controls.Add(tr);
}
}
}

I cannot fathom why the web page would turn up empty.

It is supposed to display ABCDEFGHIJKL and a button.

In the code I am trying to prove that if there is dynamically generated html code in a web page, then unblockUI will fail to unblock the page, even though blockUI will work correctly.

I am expecting the code to display ABCDEFGHIJKL and a button. Upon clicking the button the entire web page will block and would display a button. Upon clicking this button the page won't unblock even though $.unblockUI is invoked.

And I am not getting even the controls displayed in the web page.
Reply With Quote
Reply


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
How to Display an Empty DataGrid on Page Load jigsawcube1 General .NET 1 September 13th, 2007 10:00 PM
How to diplay web page inside another web page win cyberjoe C# 2 March 1st, 2007 05:35 AM
Nusoap problem - empty request in web service ronenray PHP How-To 0 February 11th, 2007 12:43 PM
Empty Pages on "New Page Before" EMS Crystal Reports 0 November 16th, 2006 10:38 AM
Page Header Printing on Last Empty Page ritag Access 4 November 11th, 2004 12:07 PM



All times are GMT -4. The time now is 06:18 AM.


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