madina1
asked on
busybox... image is not displaying
i have download a busybox javascript from online and i modify the
--css
--div and also i change my own little cute 2 images
but it does not display my image, im pasting the javasdcript as well as .aspx code for reference and also on my web site i upload the images in order to get an idea of what im talking . - thanks a lot
/// my new image looks like this:
http://www.geocities.com/dsmportal/progress.gif <<<this is my image
http://www.geocities.com/dsmportal/progress_bg.gif <<<this is m background of image
///aspx code
============
<BODY onbeforeunload="busyBox.Sh ow();" MS_POSITIONING="GridLayout ">
<form id="Form2" method="post" runat="server">
<SCRIPT>
// Instantiate our BusyBox object
//OLD CODE HERE
//var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 4, "images/gears_ani_", ".gif", 125, 147, 207);
//NEW CODE HERE
var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 4, "Images/progress.gif", 125, 147, 207);
</SCRIPT>
</form>
</BODY>
</HTML>
/// javasdcript code --PLEASE SEE THE FUNC >>>>(BusyBox.prototype.Ren derContent = function())<<<<<
==============
// -------------------------- -
// Constructor
// -------------------------- -
// BusyBox class constructor
// Arguments:
// id - id of the IFrame tag to use.
// varName - name of the variable this instance of the busy box is assigned to.
// imageCount - number of image in the animation sequence.
// imageNamePrefix - name prefix for each image.
// imageNameSuffix - name suffix for each image.
// imageDelay - number of milliseconds to display each image.
// width - defines the width of the busy box (required for Netscape and Firefox)
// height - defines the height of the busy box (required for Netscape and Firefox)
// url - (optional) url to the page containing the custom busy box layout.
//
// This example uses the default busy box layout defined internally (in the javascript).
// var busyBox = new BusyBox("BusyBox1", "busyBox", 4, "gears_ani_", ".gif", 125, 147, 206)
//
// This example uses a custom busy box layout defined in the BusyBox.htm file.
// var busyBox = new BusyBox("BusyBox1", "busyBox", 4, "gears_ani_", ".gif", 125, 147, 206, "BusyBox.htm")
//
function BusyBox(id, varName, imageCount, imageNamePrefix, imageNameSuffix, imageDelay, width, height, url)
{
// Initialize object
this.id = id;
this.ImageCount = imageCount;
this.CurrentImageIndex = 0;
this.ImageWidth = 0;
this.ImageHeight = 0;
this.ImageNamePrefix = imageNamePrefix;
this.ImageNameSuffix = imageNameSuffix;
this.ImageDelay = imageDelay;
this.DivID = "BusyBoxDiv";
this.ImgID = "BusyBoxImg";
this.Enabled = true;
this.Width = width;
this.Height = height;
// Retain the name of the instantiated object variable so that we can animate
// using the setTimeout statement
this.VarName = varName;
// Allows us to stop the animation with clearTimeout(), should we ever want to
this.timeout_id = null;
// Cache (pre-load) images
this.CacheImages();
// Url to the page containing the busy box.
this.BusyBoxUrl = url;
// Get reference to the IFrame object
this.IFrame = document.getElementById(th is.id);
// Hide the busy box
this.Hide();
if( this.BusyBoxUrl )
// Load the busy box contents using a custom layout page.
this.LoadUrl(this.BusyBoxU rl);
else
// Load the busy box contents using the internally defined layout.
this.RenderContent();
// If this browser does not support IFRAME tags then disable this control. The
// next version will implement the use of a DIV instead of the IFRAME tag;
// even though there are a couple minor issues with using DIV tags.
if( !frames[this.id] )
this.Enabled = false;
}
// -------------------------- ------
// Instance Methods
// -------------------------- ------
// GetIFrameDocument:
// Returns a reference to the document object in the IFrame.
BusyBox.prototype.GetIFram eDocument = function()
{
var doc;
if( this.IFrame.contentDocumen t )
// For NS6
doc = this.IFrame.contentDocumen t;
else if( this.IFrame.contentWindow )
// For IE5.5 and IE6
doc = this.IFrame.contentWindow. document;
else if( this.IFrame.document )
// For IE5
doc = this.IFrame.document;
else
// TODO: Confirm this should be the default
doc = this.IFrame.document;
return doc;
}
// LoadUrl:
// Changing the src attribute for an IFrame tag causes each new page to be
// added to the browsers history object. This causes undesired results for
// the user when they click the back button. Instead, we can use the
// document.location.replace( ) method to correctly load our busy box
// page into our IFrame.
//
// Arguments:
// url - url to the busy box page.
BusyBox.prototype.LoadUrl = function(url)
{
// Get a reference to the document object in the IFrame
var IFrameDoc = this.GetIFrameDocument();
// Load the url using the replace method. This will prevent the browsers
// history object from being updated with the new busybox url; thus allowing
// the back button to function as desired for the user.
IFrameDoc.location.replace (url);
}
// RenderContent:
// This method is used when the default busy box layout is used; not a custom
// layout. This method is called when the url argument for the constructor is null.
BusyBox.prototype.RenderCo ntent = function()
{
// Get the IFrame document object
var doc = this.GetIFrameDocument();
//OLD CODE COMMENT
//var style = " style='BORDER: navy 1px solid; POSITION: absolute;' ";
//NEW CODE HERE
var style = "style= body {margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;}" //" style='BORDER: navy 1px solid; POSITION: absolute;' ";
//NEW CODE HERE
doc.open();
doc.writeln("<body ondragstart='return false;' style='Margin: 0px; Background-Color: white'>");
doc.writeln(" <div id='" + this.DivID + "' align=center style='position:absolute; left:326px; top:275px; z-index:1'>");
doc.writeln(" <img id='" + this.ImgID + "' src='Images/progress.gif' width='189' height='11''>");
doc.writeln(" <div id='" + this.ImgID + "' >Building data lists ...</div>");
doc.writeln(" </div>");
doc.writeln("</body>");
doc.close();
/* // OLD CODE
doc.open();
doc.writeln("<body ondragstart='return false;' style='Margin: 0px; Background-Color: white'>");
doc.writeln(" <div id='" + this.DivID + "' align=center " + style + ">");
doc.writeln(" <img id='" + this.ImgID + "' src=''>");
doc.writeln(" <br><h5>processing...</h5> ");
doc.writeln(" </div>");
doc.writeln("</body>");
doc.close();*/
/*
}
// Resize:
// Resizes the busy box IFrame by setting its width and height attributes
// to the size of its contents.
BusyBox.prototype.Resize = function()
{
// Resize the busy box IFrame.
if( BusyBox.IsBrowserIE() )
{
// Set the width by looking at its contents
var div = frames[this.id].document.g etElementB yId(this.D ivID);
this.IFrame.style.width = div.offsetWidth;
this.IFrame.style.height = div.offsetHeight;
}
else
{
// Set the width to the value specified.
this.IFrame.style.width = this.Width;
this.IFrame.style.height = this.Height;
}
}
// Center:
// Centers the busy box IFrame on the page regardless of the browsers
// scroll position. This ensures the busy box is presented to the user
// in a visible location in the window.
BusyBox.prototype.Center = function()
{
if( !this.IFrame )
return;
// Center the BusyBox in the window regardless of the scroll positions
var objLeft = (document.body.clientWidth - this.IFrame.offsetWidth) / 2;
var objTop = (document.body.clientHeigh t - this.IFrame.offsetHeight) / 2;
objLeft = objLeft + document.body.scrollLeft;
objTop = objTop + document.body.scrollTop;
// Position object
this.IFrame.style.position = "absolute";
this.IFrame.style.top = objTop;
this.IFrame.style.left = objLeft;
}
// CacheImages:
// Pre-loads the images from the server and stores a reference to each
// image. This allows the images to be presented to the user quickly
// for smooth image animation.
BusyBox.prototype.CacheIma ges = function()
{
// Instantiate the array to store the image references
this.Images = new Array(this.ImageCount);
// Load all the images to cache into the aniframes array
for(var i = 0; i < this.ImageCount; i++)
{
this.Images[i] = new Image();
this.Images[i].src = this.ImageNamePrefix + i + this.ImageNameSuffix;
}
}
// IsAnimating:
// Returns a boolean value representing the state of the animation.
BusyBox.prototype.IsAnimat ing = function()
{
if( this.timeout_id == null)
return false;
else
return true;
}
// IsVisible:
// Returns a boolean value representing the visibility state for the busy box.
BusyBox.prototype.IsVisibl e = function()
{
var ifrm = document.getElementById(th is.id);
if( ifrm.style.visibility == "visible" && ifrm.style.width > 0 )
return true;
else
return false;
}
// Animate:
// Performs the animation process. This is accomplished by showing the "current"
// image in the animation sequence process; and then submitting a timed statement
// to execute in x number of milliseconds.
BusyBox.prototype.Animate = function()
{
// Assign the current image sequence to display
if( frames[this.id] )
// browser supports frames
frames[this.id].document.g etElementB yId(this.I mgID).src = this.Images[this.CurrentIm ageIndex]. src;
else
// browser does not support frames
document.getElementById(th is.ImgID). src = this.Images[this.CurrentIm ageIndex]. src;
// Auto re-center and re-size the busy box. This will force the busy box to
// always appear in the center of the window even if the user scrolls.
this.Resize();
this.Center();
// Increment the current image index
this.CurrentImageIndex = (this.CurrentImageIndex + 1)%this.ImageCount;
// Display the next image in (imageDelay value) milliseconds (i.e. 125)
this.timeout_id = setTimeout(this.VarName + ".Animate();", this.ImageDelay);
}
// StartAnimation:
// Starts the animation process.
BusyBox.prototype.StartAni mate = function()
{
if( this.IsAnimating() )
return;
this.Animate();
}
// StopAnimation:
// Stops the animation process.
BusyBox.prototype.StopAnim ate = function()
{
clearTimeout(this.timeout_ id);
this.timeout_id = null;
}
// Hide:
// Hides the busy box making it invisible to the user.
BusyBox.prototype.Hide = function()
{
this.StopAnimate();
// Hide the busy box.
this.IFrame.style.visibili ty = "hidden";
this.IFrame.style.width = 0;
this.IFrame.style.height = 0;
}
// Show:
// This function displays the busy box to the user. This function centers the
// busy dialog box, makes it visible, and starts the animation. This function
// will typically be called by the body event.
//
// Example:
// <body onbeforeunload="busyBox.Sh ow();" >
BusyBox.prototype.Show = function()
{
if( !this.Enabled )
return;
if( this.IsAnimating() || this.IsVisible() )
return;
this.Resize();
this.Center();
// Set the busy box to be visible and make sure it is on top of all other controls.
this.IFrame.style.visibili ty = "visible";
this.IFrame.style.zIndex = "999999";
// Start the animation
this.StartAnimate();
}
// -------------------------- ------
// Class Methods
// -------------------------- ------
// IsBrowserIE:
// Returns true if the executing browser it a Microsoft Internet Explorer browser.
BusyBox.IsBrowserIE = function()
{
try
{ return (window.navigator.userAgen t.indexOf( "MSIE ") > 0); }
catch(x)
{ return false; }
}
// IsBrowserNS:
// Returns true if the executing browser it a Netscape browser.
BusyBox.IsBrowserNS = function()
{
try
{ return (window.navigator.userAgen t.indexOf( "Netscape" ) > 0); }
catch(x)
{ return false; }
}
// IsBrowserFirefox:
// Returns true if the executing browser it a Firefox browser.
BusyBox.IsBrowserFirefox = function()
{
try
{ return (window.navigator.userAgen t.indexOf( "Firefox") > 0); }
catch(x)
{ return false; }
}
//end
//css
#busy_box {
FILTER: alpha(opacity=90);
background-image: url(Images/progress_bg.gif );
moz-opacity: .90;
height: 85px;
width: 350px;
background-repeat: no-repeat;
margin: 0px;
padding: 0px;
background-position: 0px 0px;
}
#message_body {
height: auto;
width: 350px;
font-family: Tahoma, Verdana, Arial, sans-serif;
font-size: 11px;
padding: 15px 0px 0px;
text-align: center;
font-weight: normal;
}
#progress_bar {
height: auto;
width: 350px;
font-family: Tahoma, Verdana, Arial, sans-serif;
font-size: 11px;
padding: 15px 0px 0px;
text-align: center;
font-weight: bold;
}
--css
--div and also i change my own little cute 2 images
but it does not display my image, im pasting the javasdcript as well as .aspx code for reference and also on my web site i upload the images in order to get an idea of what im talking . - thanks a lot
/// my new image looks like this:
http://www.geocities.com/dsmportal/progress.gif <<<this is my image
http://www.geocities.com/dsmportal/progress_bg.gif <<<this is m background of image
///aspx code
============
<BODY onbeforeunload="busyBox.Sh
<form id="Form2" method="post" runat="server">
<SCRIPT>
// Instantiate our BusyBox object
//OLD CODE HERE
//var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 4, "images/gears_ani_", ".gif", 125, 147, 207);
//NEW CODE HERE
var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 4, "Images/progress.gif", 125, 147, 207);
</SCRIPT>
</form>
</BODY>
</HTML>
/// javasdcript code --PLEASE SEE THE FUNC >>>>(BusyBox.prototype.Ren
==============
// --------------------------
// Constructor
// --------------------------
// BusyBox class constructor
// Arguments:
// id - id of the IFrame tag to use.
// varName - name of the variable this instance of the busy box is assigned to.
// imageCount - number of image in the animation sequence.
// imageNamePrefix - name prefix for each image.
// imageNameSuffix - name suffix for each image.
// imageDelay - number of milliseconds to display each image.
// width - defines the width of the busy box (required for Netscape and Firefox)
// height - defines the height of the busy box (required for Netscape and Firefox)
// url - (optional) url to the page containing the custom busy box layout.
//
// This example uses the default busy box layout defined internally (in the javascript).
// var busyBox = new BusyBox("BusyBox1", "busyBox", 4, "gears_ani_", ".gif", 125, 147, 206)
//
// This example uses a custom busy box layout defined in the BusyBox.htm file.
// var busyBox = new BusyBox("BusyBox1", "busyBox", 4, "gears_ani_", ".gif", 125, 147, 206, "BusyBox.htm")
//
function BusyBox(id, varName, imageCount, imageNamePrefix, imageNameSuffix, imageDelay, width, height, url)
{
// Initialize object
this.id = id;
this.ImageCount = imageCount;
this.CurrentImageIndex = 0;
this.ImageWidth = 0;
this.ImageHeight = 0;
this.ImageNamePrefix = imageNamePrefix;
this.ImageNameSuffix = imageNameSuffix;
this.ImageDelay = imageDelay;
this.DivID = "BusyBoxDiv";
this.ImgID = "BusyBoxImg";
this.Enabled = true;
this.Width = width;
this.Height = height;
// Retain the name of the instantiated object variable so that we can animate
// using the setTimeout statement
this.VarName = varName;
// Allows us to stop the animation with clearTimeout(), should we ever want to
this.timeout_id = null;
// Cache (pre-load) images
this.CacheImages();
// Url to the page containing the busy box.
this.BusyBoxUrl = url;
// Get reference to the IFrame object
this.IFrame = document.getElementById(th
// Hide the busy box
this.Hide();
if( this.BusyBoxUrl )
// Load the busy box contents using a custom layout page.
this.LoadUrl(this.BusyBoxU
else
// Load the busy box contents using the internally defined layout.
this.RenderContent();
// If this browser does not support IFRAME tags then disable this control. The
// next version will implement the use of a DIV instead of the IFRAME tag;
// even though there are a couple minor issues with using DIV tags.
if( !frames[this.id] )
this.Enabled = false;
}
// --------------------------
// Instance Methods
// --------------------------
// GetIFrameDocument:
// Returns a reference to the document object in the IFrame.
BusyBox.prototype.GetIFram
{
var doc;
if( this.IFrame.contentDocumen
// For NS6
doc = this.IFrame.contentDocumen
else if( this.IFrame.contentWindow )
// For IE5.5 and IE6
doc = this.IFrame.contentWindow.
else if( this.IFrame.document )
// For IE5
doc = this.IFrame.document;
else
// TODO: Confirm this should be the default
doc = this.IFrame.document;
return doc;
}
// LoadUrl:
// Changing the src attribute for an IFrame tag causes each new page to be
// added to the browsers history object. This causes undesired results for
// the user when they click the back button. Instead, we can use the
// document.location.replace(
// page into our IFrame.
//
// Arguments:
// url - url to the busy box page.
BusyBox.prototype.LoadUrl = function(url)
{
// Get a reference to the document object in the IFrame
var IFrameDoc = this.GetIFrameDocument();
// Load the url using the replace method. This will prevent the browsers
// history object from being updated with the new busybox url; thus allowing
// the back button to function as desired for the user.
IFrameDoc.location.replace
}
// RenderContent:
// This method is used when the default busy box layout is used; not a custom
// layout. This method is called when the url argument for the constructor is null.
BusyBox.prototype.RenderCo
{
// Get the IFrame document object
var doc = this.GetIFrameDocument();
//OLD CODE COMMENT
//var style = " style='BORDER: navy 1px solid; POSITION: absolute;' ";
//NEW CODE HERE
var style = "style= body {margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;}" //" style='BORDER: navy 1px solid; POSITION: absolute;' ";
//NEW CODE HERE
doc.open();
doc.writeln("<body ondragstart='return false;' style='Margin: 0px; Background-Color: white'>");
doc.writeln(" <div id='" + this.DivID + "' align=center style='position:absolute; left:326px; top:275px; z-index:1'>");
doc.writeln(" <img id='" + this.ImgID + "' src='Images/progress.gif' width='189' height='11''>");
doc.writeln(" <div id='" + this.ImgID + "' >Building data lists ...</div>");
doc.writeln(" </div>");
doc.writeln("</body>");
doc.close();
/* // OLD CODE
doc.open();
doc.writeln("<body ondragstart='return false;' style='Margin: 0px; Background-Color: white'>");
doc.writeln(" <div id='" + this.DivID + "' align=center " + style + ">");
doc.writeln(" <img id='" + this.ImgID + "' src=''>");
doc.writeln(" <br><h5>processing...</h5>
doc.writeln(" </div>");
doc.writeln("</body>");
doc.close();*/
/*
}
// Resize:
// Resizes the busy box IFrame by setting its width and height attributes
// to the size of its contents.
BusyBox.prototype.Resize = function()
{
// Resize the busy box IFrame.
if( BusyBox.IsBrowserIE() )
{
// Set the width by looking at its contents
var div = frames[this.id].document.g
this.IFrame.style.width = div.offsetWidth;
this.IFrame.style.height = div.offsetHeight;
}
else
{
// Set the width to the value specified.
this.IFrame.style.width = this.Width;
this.IFrame.style.height = this.Height;
}
}
// Center:
// Centers the busy box IFrame on the page regardless of the browsers
// scroll position. This ensures the busy box is presented to the user
// in a visible location in the window.
BusyBox.prototype.Center = function()
{
if( !this.IFrame )
return;
// Center the BusyBox in the window regardless of the scroll positions
var objLeft = (document.body.clientWidth
var objTop = (document.body.clientHeigh
objLeft = objLeft + document.body.scrollLeft;
objTop = objTop + document.body.scrollTop;
// Position object
this.IFrame.style.position
this.IFrame.style.top = objTop;
this.IFrame.style.left = objLeft;
}
// CacheImages:
// Pre-loads the images from the server and stores a reference to each
// image. This allows the images to be presented to the user quickly
// for smooth image animation.
BusyBox.prototype.CacheIma
{
// Instantiate the array to store the image references
this.Images = new Array(this.ImageCount);
// Load all the images to cache into the aniframes array
for(var i = 0; i < this.ImageCount; i++)
{
this.Images[i] = new Image();
this.Images[i].src = this.ImageNamePrefix + i + this.ImageNameSuffix;
}
}
// IsAnimating:
// Returns a boolean value representing the state of the animation.
BusyBox.prototype.IsAnimat
{
if( this.timeout_id == null)
return false;
else
return true;
}
// IsVisible:
// Returns a boolean value representing the visibility state for the busy box.
BusyBox.prototype.IsVisibl
{
var ifrm = document.getElementById(th
if( ifrm.style.visibility == "visible" && ifrm.style.width > 0 )
return true;
else
return false;
}
// Animate:
// Performs the animation process. This is accomplished by showing the "current"
// image in the animation sequence process; and then submitting a timed statement
// to execute in x number of milliseconds.
BusyBox.prototype.Animate = function()
{
// Assign the current image sequence to display
if( frames[this.id] )
// browser supports frames
frames[this.id].document.g
else
// browser does not support frames
document.getElementById(th
// Auto re-center and re-size the busy box. This will force the busy box to
// always appear in the center of the window even if the user scrolls.
this.Resize();
this.Center();
// Increment the current image index
this.CurrentImageIndex = (this.CurrentImageIndex + 1)%this.ImageCount;
// Display the next image in (imageDelay value) milliseconds (i.e. 125)
this.timeout_id = setTimeout(this.VarName + ".Animate();", this.ImageDelay);
}
// StartAnimation:
// Starts the animation process.
BusyBox.prototype.StartAni
{
if( this.IsAnimating() )
return;
this.Animate();
}
// StopAnimation:
// Stops the animation process.
BusyBox.prototype.StopAnim
{
clearTimeout(this.timeout_
this.timeout_id = null;
}
// Hide:
// Hides the busy box making it invisible to the user.
BusyBox.prototype.Hide = function()
{
this.StopAnimate();
// Hide the busy box.
this.IFrame.style.visibili
this.IFrame.style.width = 0;
this.IFrame.style.height = 0;
}
// Show:
// This function displays the busy box to the user. This function centers the
// busy dialog box, makes it visible, and starts the animation. This function
// will typically be called by the body event.
//
// Example:
// <body onbeforeunload="busyBox.Sh
BusyBox.prototype.Show = function()
{
if( !this.Enabled )
return;
if( this.IsAnimating() || this.IsVisible() )
return;
this.Resize();
this.Center();
// Set the busy box to be visible and make sure it is on top of all other controls.
this.IFrame.style.visibili
this.IFrame.style.zIndex = "999999";
// Start the animation
this.StartAnimate();
}
// --------------------------
// Class Methods
// --------------------------
// IsBrowserIE:
// Returns true if the executing browser it a Microsoft Internet Explorer browser.
BusyBox.IsBrowserIE = function()
{
try
{ return (window.navigator.userAgen
catch(x)
{ return false; }
}
// IsBrowserNS:
// Returns true if the executing browser it a Netscape browser.
BusyBox.IsBrowserNS = function()
{
try
{ return (window.navigator.userAgen
catch(x)
{ return false; }
}
// IsBrowserFirefox:
// Returns true if the executing browser it a Firefox browser.
BusyBox.IsBrowserFirefox = function()
{
try
{ return (window.navigator.userAgen
catch(x)
{ return false; }
}
//end
//css
#busy_box {
FILTER: alpha(opacity=90);
background-image: url(Images/progress_bg.gif
moz-opacity: .90;
height: 85px;
width: 350px;
background-repeat: no-repeat;
margin: 0px;
padding: 0px;
background-position: 0px 0px;
}
#message_body {
height: auto;
width: 350px;
font-family: Tahoma, Verdana, Arial, sans-serif;
font-size: 11px;
padding: 15px 0px 0px;
text-align: center;
font-weight: normal;
}
#progress_bar {
height: auto;
width: 350px;
font-family: Tahoma, Verdana, Arial, sans-serif;
font-size: 11px;
padding: 15px 0px 0px;
text-align: center;
font-weight: bold;
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
oops i missed that single quote
but still image is not showing
im getting a white blank div
but still image is not showing
im getting a white blank div
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
nothing is coming
im getting a white blank div without any image
thanks for your reply, apprecate if you please please look
im getting a white blank div without any image
thanks for your reply, apprecate if you please please look
ASKER
>>>Is your page accessible online?
unfortunately not
unfortunately not
Your //NEW CODE HERE removes one parameter: imageNameSuffix
Do you see that?
Do you see that?
And it seams you do not use the functionality of that script library at all!
Why do you mess with it then?
Why do you mess with it then?
ASKER
you mean:
//OLD CODE HERE
//var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 4, "images/gears_ani_", ".gif", 125, 147, 207);
//NEW CODE HERE
var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 4, "Images/progress.gif", 125, 147, 207);
? ".gif",
I have tried giving exactly what was there before like...
//?
var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 4, "Images/progress", ".gif", 125, 147, 207);
//OLD CODE HERE
//var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 4, "images/gears_ani_", ".gif", 125, 147, 207);
//NEW CODE HERE
var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 4, "Images/progress.gif", 125, 147, 207);
? ".gif",
I have tried giving exactly what was there before like...
//?
var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 4, "Images/progress", ".gif", 125, 147, 207);
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i mess because i wanted to replace the image to :
/// my new image looks like this:
http://www.geocities.com/dsmportal/progress.gif <<<this is my image
http://www.geocities.com/dsmportal/progress_bg.gif <<<this is m background of image
/// my new image looks like this:
http://www.geocities.com/dsmportal/progress.gif <<<this is my image
http://www.geocities.com/dsmportal/progress_bg.gif <<<this is m background of image
Try this:
var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 1, "Images/progress", ".gif", 125, 147, 207);
And name you image like this:
Images/progress1.gif
and place them in a subdirectory relative to the dir where your page is in.
var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 1, "Images/progress", ".gif", 125, 147, 207);
And name you image like this:
Images/progress1.gif
and place them in a subdirectory relative to the dir where your page is in.
ASKER
im getting this error:
line 304
char: 6
error: BusyBox is undefined
line 304
char: 6
error: BusyBox is undefined
ASKER
Zvonko : let me try this
Again, position your DIV to 0,0.
Here is the RenderContent I use - I see the image - even if it's broken (look at Zvonko advice)
// RenderContent:
// This method is used when the default busy box layout is used; not a custom
// layout. This method is called when the url argument for the constructor is null.
BusyBox.prototype.RenderCo ntent = function()
{
// Get the IFrame document object
var doc = this.GetIFrameDocument();
//OLD CODE COMMENT
//var style = " style='BORDER: navy 1px solid; POSITION: absolute;' ";
//NEW CODE HERE
doc.open();
doc.writeln("<body ondragstart='return false;' style='Margin: 0px; Background-Color: white'>");
doc.writeln(" <div id='" + this.DivID + "' align=center style='position:absolute; left:0px; top:0px; z-index:1'>");
doc.writeln(" <img id='" + this.ImgID + "' src='Images/progress.gif' width='189' height='11''>");
doc.writeln(" <div id='" + this.ImgID + "' >Building data lists ...</div>");
doc.writeln(" </div>");
doc.writeln("</body>");
doc.close();
}
Here is the RenderContent I use - I see the image - even if it's broken (look at Zvonko advice)
// RenderContent:
// This method is used when the default busy box layout is used; not a custom
// layout. This method is called when the url argument for the constructor is null.
BusyBox.prototype.RenderCo
{
// Get the IFrame document object
var doc = this.GetIFrameDocument();
//OLD CODE COMMENT
//var style = " style='BORDER: navy 1px solid; POSITION: absolute;' ";
//NEW CODE HERE
doc.open();
doc.writeln("<body ondragstart='return false;' style='Margin: 0px; Background-Color: white'>");
doc.writeln(" <div id='" + this.DivID + "' align=center style='position:absolute; left:0px; top:0px; z-index:1'>");
doc.writeln(" <img id='" + this.ImgID + "' src='Images/progress.gif' width='189' height='11''>");
doc.writeln(" <div id='" + this.ImgID + "' >Building data lists ...</div>");
doc.writeln(" </div>");
doc.writeln("</body>");
doc.close();
}
ASKER
Zvonko : i add one more image with the name images/progress1.gif foler
smaccari : i have changed to 0
but somehow when i run my page i get the error:
line 304
char: 6
error: BusyBox is undefined
smaccari : i have changed to 0
but somehow when i run my page i get the error:
line 304
char: 6
error: BusyBox is undefined
ASKER
no error now
but i dont able to see the image its blank white background
i think we are pretty close to fix this
but i dont able to see the image its blank white background
i think we are pretty close to fix this
I had some errors too to make it work.
So here is the code I use, it works for me: (I replaced the busyBox declaration as Zvonko showed)
<BODY onbeforeunload="" MS_POSITIONING="GridLayout ">
<form id="Form2" method="post" runat="server">
<script>
/// javasdcript code --PLEASE SEE THE FUNC >>>>(BusyBox.prototype.Ren derContent = function())<<<<<
// -------------------------- -
// Constructor
// -------------------------- -
// BusyBox class constructor
// Arguments:
// id - id of the IFrame tag to use.
// varName - name of the variable this instance of the busy box is assigned to.
// imageCount - number of image in the animation sequence.
// imageNamePrefix - name prefix for each image.
// imageNameSuffix - name suffix for each image.
// imageDelay - number of milliseconds to display each image.
// width - defines the width of the busy box (required for Netscape and Firefox)
// height - defines the height of the busy box (required for Netscape and Firefox)
// url - (optional) url to the page containing the custom busy box layout.
//
// This example uses the default busy box layout defined internally (in the javascript).
// var busyBox = new BusyBox("BusyBox1", "busyBox", 4, "gears_ani_", ".gif", 125, 147, 206)
//
// This example uses a custom busy box layout defined in the BusyBox.htm file.
// var busyBox = new BusyBox("BusyBox1", "busyBox", 4, "gears_ani_", ".gif", 125, 147, 206, "BusyBox.htm")
//
function BusyBox(id, varName, imageCount, imageNamePrefix, imageNameSuffix, imageDelay, width, height, url)
{
// Initialize object
this.id = id;
this.ImageCount = imageCount;
this.CurrentImageIndex = 0;
this.ImageWidth = 0;
this.ImageHeight = 0;
this.ImageNamePrefix = imageNamePrefix;
this.ImageNameSuffix = imageNameSuffix;
this.ImageDelay = imageDelay;
this.DivID = "BusyBoxDiv";
this.ImgID = "BusyBoxImg";
this.Enabled = true;
this.Width = width;
this.Height = height;
// Retain the name of the instantiated object variable so that we can animate
// using the setTimeout statement
this.VarName = varName;
// Allows us to stop the animation with clearTimeout(), should we ever want to
this.timeout_id = null;
// Cache (pre-load) images
this.CacheImages();
// Url to the page containing the busy box.
this.BusyBoxUrl = url;
// Get reference to the IFrame object
this.IFrame = document.getElementById(th is.id);
// Hide the busy box
this.Hide();
if( this.BusyBoxUrl )
// Load the busy box contents using a custom layout page.
this.LoadUrl(this.BusyBoxU rl);
else
// Load the busy box contents using the internally defined layout.
this.RenderContent();
// If this browser does not support IFRAME tags then disable this control. The
// next version will implement the use of a DIV instead of the IFRAME tag;
// even though there are a couple minor issues with using DIV tags.
if( !frames[this.id] )
this.Enabled = false;
}
// -------------------------- ------
// Instance Methods
// -------------------------- ------
// GetIFrameDocument:
// Returns a reference to the document object in the IFrame.
BusyBox.prototype.GetIFram eDocument = function()
{
var doc;
if( this.IFrame.contentDocumen t )
// For NS6
doc = this.IFrame.contentDocumen t;
else if( this.IFrame.contentWindow )
// For IE5.5 and IE6
doc = this.IFrame.contentWindow. document;
else if( this.IFrame.document )
// For IE5
doc = this.IFrame.document;
else
// TODO: Confirm this should be the default
doc = this.IFrame.document;
return doc;
}
// LoadUrl:
// Changing the src attribute for an IFrame tag causes each new page to be
// added to the browsers history object. This causes undesired results for
// the user when they click the back button. Instead, we can use the
// document.location.replace( ) method to correctly load our busy box
// page into our IFrame.
//
// Arguments:
// url - url to the busy box page.
BusyBox.prototype.LoadUrl = function(url)
{
// Get a reference to the document object in the IFrame
var IFrameDoc = this.GetIFrameDocument();
// Load the url using the replace method. This will prevent the browsers
// history object from being updated with the new busybox url; thus allowing
// the back button to function as desired for the user.
IFrameDoc.location.replace (url);
}
// RenderContent:
// This method is used when the default busy box layout is used; not a custom
// layout. This method is called when the url argument for the constructor is null.
// RenderContent:
// This method is used when the default busy box layout is used; not a custom
// layout. This method is called when the url argument for the constructor is null.
BusyBox.prototype.RenderCo ntent = function()
{
// Get the IFrame document object
var doc = this.GetIFrameDocument();
//OLD CODE COMMENT
//var style = " style='BORDER: navy 1px solid; POSITION: absolute;' ";
//NEW CODE HERE
doc.open();
doc.writeln("<body ondragstart='return false;' style='Margin: 0px; Background-Color: white'>");
doc.writeln(" <div id='" + this.DivID + "' align=center style='position:absolute; left:0px; top:0px; z-index:1'>");
doc.writeln(" <img id='" + this.ImgID + "' src='Images/progress.gif' width='189' height='11''>");
doc.writeln(" <div id='" + this.ImgID + "' >Building data lists ...</div>");
doc.writeln(" </div>");
doc.writeln("</body>");
doc.close();
}
// Resize:
// Resizes the busy box IFrame by setting its width and height attributes
// to the size of its contents.
BusyBox.prototype.Resize = function()
{
// Resize the busy box IFrame.
if( BusyBox.IsBrowserIE() )
{
// Set the width by looking at its contents
var div = frames[this.id].document.g etElementB yId(this.D ivID);
this.IFrame.style.width = div.offsetWidth;
this.IFrame.style.height = div.offsetHeight;
}
else
{
// Set the width to the value specified.
this.IFrame.style.width = this.Width;
this.IFrame.style.height = this.Height;
}
}
// Center:
// Centers the busy box IFrame on the page regardless of the browsers
// scroll position. This ensures the busy box is presented to the user
// in a visible location in the window.
BusyBox.prototype.Center = function()
{
if( !this.IFrame )
return;
// Center the BusyBox in the window regardless of the scroll positions
var objLeft = (document.body.clientWidth - this.IFrame.offsetWidth) / 2;
var objTop = (document.body.clientHeigh t - this.IFrame.offsetHeight) / 2;
objLeft = objLeft + document.body.scrollLeft;
objTop = objTop + document.body.scrollTop;
// Position object
this.IFrame.style.position = "absolute";
this.IFrame.style.top = objTop;
this.IFrame.style.left = objLeft;
}
// CacheImages:
// Pre-loads the images from the server and stores a reference to each
// image. This allows the images to be presented to the user quickly
// for smooth image animation.
BusyBox.prototype.CacheIma ges = function()
{
// Instantiate the array to store the image references
this.Images = new Array(this.ImageCount);
// Load all the images to cache into the aniframes array
for(var i = 0; i < this.ImageCount; i++)
{
this.Images[i] = new Image();
this.Images[i].src = this.ImageNamePrefix + i + this.ImageNameSuffix;
}
}
// IsAnimating:
// Returns a boolean value representing the state of the animation.
BusyBox.prototype.IsAnimat ing = function()
{
if( this.timeout_id == null)
return false;
else
return true;
}
// IsVisible:
// Returns a boolean value representing the visibility state for the busy box.
BusyBox.prototype.IsVisibl e = function()
{
var ifrm = document.getElementById(th is.id);
if( ifrm.style.visibility == "visible" && ifrm.style.width > 0 )
return true;
else
return false;
}
// Animate:
// Performs the animation process. This is accomplished by showing the "current"
// image in the animation sequence process; and then submitting a timed statement
// to execute in x number of milliseconds.
BusyBox.prototype.Animate = function()
{
// Assign the current image sequence to display
if( frames[this.id] )
// browser supports frames
frames[this.id].document.g etElementB yId(this.I mgID).src = this.Images[this.CurrentIm ageIndex]. src;
else
// browser does not support frames
document.getElementById(th is.ImgID). src = this.Images[this.CurrentIm ageIndex]. src;
// Auto re-center and re-size the busy box. This will force the busy box to
// always appear in the center of the window even if the user scrolls.
this.Resize();
this.Center();
// Increment the current image index
this.CurrentImageIndex = (this.CurrentImageIndex + 1)%this.ImageCount;
// Display the next image in (imageDelay value) milliseconds (i.e. 125)
this.timeout_id = setTimeout(this.VarName + ".Animate();", this.ImageDelay);
}
// StartAnimation:
// Starts the animation process.
BusyBox.prototype.StartAni mate = function()
{
if( this.IsAnimating() )
return;
this.Animate();
}
// StopAnimation:
// Stops the animation process.
BusyBox.prototype.StopAnim ate = function()
{
clearTimeout(this.timeout_ id);
this.timeout_id = null;
}
// Hide:
// Hides the busy box making it invisible to the user.
BusyBox.prototype.Hide = function()
{
this.StopAnimate();
// Hide the busy box.
this.IFrame.style.visibili ty = "hidden";
this.IFrame.style.width = 0;
this.IFrame.style.height = 0;
}
// Show:
// This function displays the busy box to the user. This function centers the
// busy dialog box, makes it visible, and starts the animation. This function
// will typically be called by the body event.
//
// Example:
// <body onbeforeunload="busyBox.Sh ow();" >
BusyBox.prototype.Show = function()
{
if( !this.Enabled )
return;
if( this.IsAnimating() || this.IsVisible() )
return;
this.Resize();
this.Center();
// Set the busy box to be visible and make sure it is on top of all other controls.
this.IFrame.style.visibili ty = "visible";
this.IFrame.style.zIndex = "999999";
// Start the animation
this.StartAnimate();
}
// -------------------------- ------
// Class Methods
// -------------------------- ------
// IsBrowserIE:
// Returns true if the executing browser it a Microsoft Internet Explorer browser.
BusyBox.IsBrowserIE = function()
{
try
{ return (window.navigator.userAgen t.indexOf( "MSIE ") > 0); }
catch(x)
{ return false; }
}
// IsBrowserNS:
// Returns true if the executing browser it a Netscape browser.
BusyBox.IsBrowserNS = function()
{
try
{ return (window.navigator.userAgen t.indexOf( "Netscape" ) > 0); }
catch(x)
{ return false; }
}
// IsBrowserFirefox:
// Returns true if the executing browser it a Firefox browser.
BusyBox.IsBrowserFirefox = function()
{
try
{ return (window.navigator.userAgen t.indexOf( "Firefox") > 0); }
catch(x)
{ return false; }
}
</script>
<iframe id=BusyBoxIFrame scrolling=no frameborder=0></iframe>
<SCRIPT>
var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 1, "Images/progress", ".gif", 125, 147, 207);
busyBox.Show();
</SCRIPT>
</form>
</BODY>
</HTML>
So here is the code I use, it works for me: (I replaced the busyBox declaration as Zvonko showed)
<BODY onbeforeunload="" MS_POSITIONING="GridLayout
<form id="Form2" method="post" runat="server">
<script>
/// javasdcript code --PLEASE SEE THE FUNC >>>>(BusyBox.prototype.Ren
// --------------------------
// Constructor
// --------------------------
// BusyBox class constructor
// Arguments:
// id - id of the IFrame tag to use.
// varName - name of the variable this instance of the busy box is assigned to.
// imageCount - number of image in the animation sequence.
// imageNamePrefix - name prefix for each image.
// imageNameSuffix - name suffix for each image.
// imageDelay - number of milliseconds to display each image.
// width - defines the width of the busy box (required for Netscape and Firefox)
// height - defines the height of the busy box (required for Netscape and Firefox)
// url - (optional) url to the page containing the custom busy box layout.
//
// This example uses the default busy box layout defined internally (in the javascript).
// var busyBox = new BusyBox("BusyBox1", "busyBox", 4, "gears_ani_", ".gif", 125, 147, 206)
//
// This example uses a custom busy box layout defined in the BusyBox.htm file.
// var busyBox = new BusyBox("BusyBox1", "busyBox", 4, "gears_ani_", ".gif", 125, 147, 206, "BusyBox.htm")
//
function BusyBox(id, varName, imageCount, imageNamePrefix, imageNameSuffix, imageDelay, width, height, url)
{
// Initialize object
this.id = id;
this.ImageCount = imageCount;
this.CurrentImageIndex = 0;
this.ImageWidth = 0;
this.ImageHeight = 0;
this.ImageNamePrefix = imageNamePrefix;
this.ImageNameSuffix = imageNameSuffix;
this.ImageDelay = imageDelay;
this.DivID = "BusyBoxDiv";
this.ImgID = "BusyBoxImg";
this.Enabled = true;
this.Width = width;
this.Height = height;
// Retain the name of the instantiated object variable so that we can animate
// using the setTimeout statement
this.VarName = varName;
// Allows us to stop the animation with clearTimeout(), should we ever want to
this.timeout_id = null;
// Cache (pre-load) images
this.CacheImages();
// Url to the page containing the busy box.
this.BusyBoxUrl = url;
// Get reference to the IFrame object
this.IFrame = document.getElementById(th
// Hide the busy box
this.Hide();
if( this.BusyBoxUrl )
// Load the busy box contents using a custom layout page.
this.LoadUrl(this.BusyBoxU
else
// Load the busy box contents using the internally defined layout.
this.RenderContent();
// If this browser does not support IFRAME tags then disable this control. The
// next version will implement the use of a DIV instead of the IFRAME tag;
// even though there are a couple minor issues with using DIV tags.
if( !frames[this.id] )
this.Enabled = false;
}
// --------------------------
// Instance Methods
// --------------------------
// GetIFrameDocument:
// Returns a reference to the document object in the IFrame.
BusyBox.prototype.GetIFram
{
var doc;
if( this.IFrame.contentDocumen
// For NS6
doc = this.IFrame.contentDocumen
else if( this.IFrame.contentWindow )
// For IE5.5 and IE6
doc = this.IFrame.contentWindow.
else if( this.IFrame.document )
// For IE5
doc = this.IFrame.document;
else
// TODO: Confirm this should be the default
doc = this.IFrame.document;
return doc;
}
// LoadUrl:
// Changing the src attribute for an IFrame tag causes each new page to be
// added to the browsers history object. This causes undesired results for
// the user when they click the back button. Instead, we can use the
// document.location.replace(
// page into our IFrame.
//
// Arguments:
// url - url to the busy box page.
BusyBox.prototype.LoadUrl = function(url)
{
// Get a reference to the document object in the IFrame
var IFrameDoc = this.GetIFrameDocument();
// Load the url using the replace method. This will prevent the browsers
// history object from being updated with the new busybox url; thus allowing
// the back button to function as desired for the user.
IFrameDoc.location.replace
}
// RenderContent:
// This method is used when the default busy box layout is used; not a custom
// layout. This method is called when the url argument for the constructor is null.
// RenderContent:
// This method is used when the default busy box layout is used; not a custom
// layout. This method is called when the url argument for the constructor is null.
BusyBox.prototype.RenderCo
{
// Get the IFrame document object
var doc = this.GetIFrameDocument();
//OLD CODE COMMENT
//var style = " style='BORDER: navy 1px solid; POSITION: absolute;' ";
//NEW CODE HERE
doc.open();
doc.writeln("<body ondragstart='return false;' style='Margin: 0px; Background-Color: white'>");
doc.writeln(" <div id='" + this.DivID + "' align=center style='position:absolute; left:0px; top:0px; z-index:1'>");
doc.writeln(" <img id='" + this.ImgID + "' src='Images/progress.gif' width='189' height='11''>");
doc.writeln(" <div id='" + this.ImgID + "' >Building data lists ...</div>");
doc.writeln(" </div>");
doc.writeln("</body>");
doc.close();
}
// Resize:
// Resizes the busy box IFrame by setting its width and height attributes
// to the size of its contents.
BusyBox.prototype.Resize = function()
{
// Resize the busy box IFrame.
if( BusyBox.IsBrowserIE() )
{
// Set the width by looking at its contents
var div = frames[this.id].document.g
this.IFrame.style.width = div.offsetWidth;
this.IFrame.style.height = div.offsetHeight;
}
else
{
// Set the width to the value specified.
this.IFrame.style.width = this.Width;
this.IFrame.style.height = this.Height;
}
}
// Center:
// Centers the busy box IFrame on the page regardless of the browsers
// scroll position. This ensures the busy box is presented to the user
// in a visible location in the window.
BusyBox.prototype.Center = function()
{
if( !this.IFrame )
return;
// Center the BusyBox in the window regardless of the scroll positions
var objLeft = (document.body.clientWidth
var objTop = (document.body.clientHeigh
objLeft = objLeft + document.body.scrollLeft;
objTop = objTop + document.body.scrollTop;
// Position object
this.IFrame.style.position
this.IFrame.style.top = objTop;
this.IFrame.style.left = objLeft;
}
// CacheImages:
// Pre-loads the images from the server and stores a reference to each
// image. This allows the images to be presented to the user quickly
// for smooth image animation.
BusyBox.prototype.CacheIma
{
// Instantiate the array to store the image references
this.Images = new Array(this.ImageCount);
// Load all the images to cache into the aniframes array
for(var i = 0; i < this.ImageCount; i++)
{
this.Images[i] = new Image();
this.Images[i].src = this.ImageNamePrefix + i + this.ImageNameSuffix;
}
}
// IsAnimating:
// Returns a boolean value representing the state of the animation.
BusyBox.prototype.IsAnimat
{
if( this.timeout_id == null)
return false;
else
return true;
}
// IsVisible:
// Returns a boolean value representing the visibility state for the busy box.
BusyBox.prototype.IsVisibl
{
var ifrm = document.getElementById(th
if( ifrm.style.visibility == "visible" && ifrm.style.width > 0 )
return true;
else
return false;
}
// Animate:
// Performs the animation process. This is accomplished by showing the "current"
// image in the animation sequence process; and then submitting a timed statement
// to execute in x number of milliseconds.
BusyBox.prototype.Animate = function()
{
// Assign the current image sequence to display
if( frames[this.id] )
// browser supports frames
frames[this.id].document.g
else
// browser does not support frames
document.getElementById(th
// Auto re-center and re-size the busy box. This will force the busy box to
// always appear in the center of the window even if the user scrolls.
this.Resize();
this.Center();
// Increment the current image index
this.CurrentImageIndex = (this.CurrentImageIndex + 1)%this.ImageCount;
// Display the next image in (imageDelay value) milliseconds (i.e. 125)
this.timeout_id = setTimeout(this.VarName + ".Animate();", this.ImageDelay);
}
// StartAnimation:
// Starts the animation process.
BusyBox.prototype.StartAni
{
if( this.IsAnimating() )
return;
this.Animate();
}
// StopAnimation:
// Stops the animation process.
BusyBox.prototype.StopAnim
{
clearTimeout(this.timeout_
this.timeout_id = null;
}
// Hide:
// Hides the busy box making it invisible to the user.
BusyBox.prototype.Hide = function()
{
this.StopAnimate();
// Hide the busy box.
this.IFrame.style.visibili
this.IFrame.style.width = 0;
this.IFrame.style.height = 0;
}
// Show:
// This function displays the busy box to the user. This function centers the
// busy dialog box, makes it visible, and starts the animation. This function
// will typically be called by the body event.
//
// Example:
// <body onbeforeunload="busyBox.Sh
BusyBox.prototype.Show = function()
{
if( !this.Enabled )
return;
if( this.IsAnimating() || this.IsVisible() )
return;
this.Resize();
this.Center();
// Set the busy box to be visible and make sure it is on top of all other controls.
this.IFrame.style.visibili
this.IFrame.style.zIndex = "999999";
// Start the animation
this.StartAnimate();
}
// --------------------------
// Class Methods
// --------------------------
// IsBrowserIE:
// Returns true if the executing browser it a Microsoft Internet Explorer browser.
BusyBox.IsBrowserIE = function()
{
try
{ return (window.navigator.userAgen
catch(x)
{ return false; }
}
// IsBrowserNS:
// Returns true if the executing browser it a Netscape browser.
BusyBox.IsBrowserNS = function()
{
try
{ return (window.navigator.userAgen
catch(x)
{ return false; }
}
// IsBrowserFirefox:
// Returns true if the executing browser it a Firefox browser.
BusyBox.IsBrowserFirefox = function()
{
try
{ return (window.navigator.userAgen
catch(x)
{ return false; }
}
</script>
<iframe id=BusyBoxIFrame scrolling=no frameborder=0></iframe>
<SCRIPT>
var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 1, "Images/progress", ".gif", 125, 147, 207);
busyBox.Show();
</SCRIPT>
</form>
</BODY>
</HTML>
ASKER
i dont see the image but i see white background and text says "Building data lists "
i have a image :
//progress image
http://www.geocities.com/dsmportal/progress.gif
//bacground image for that progress image
http://www.geocities.com/dsmportal/progress_bg.gif
i have a image :
//progress image
http://www.geocities.com/dsmportal/progress.gif
//bacground image for that progress image
http://www.geocities.com/dsmportal/progress_bg.gif
ASKER
smaccari : you want me to copy and paste the whole js ?
I do not see why you want to use that script library.
You removed the original style and put your own fixed position style (and perhaps expect it to scroll)
You give the this.ImgID to several elements and woder why they cannot be accessed...
Without seeing your page does this support frustrate you and us.
Either post your complette page here or zip it and uplode it like the gif images to a server.
You removed the original style and put your own fixed position style (and perhaps expect it to scroll)
You give the this.ImgID to several elements and woder why they cannot be accessed...
Without seeing your page does this support frustrate you and us.
Either post your complette page here or zip it and uplode it like the gif images to a server.
copy and paste the whole code to a new htm page to see if it's working.
If so, then yes, copy the JS from the frist SCRIPT tag.
If so, then yes, copy the JS from the frist SCRIPT tag.
ASKER
smaccari : as i have said that i see only the white background with the text on it "building list"
Zvonko: sorry if this is frustration and i will try to upload to the site, again please bare with me.
Zvonko: sorry if this is frustration and i will try to upload to the site, again please bare with me.
ASKER
i upload the:
1) busybox.htm ( htm page (its include the javascript inside the page)
http://www.geocities.com/dsmportal/busybox.htm
2) images/progress.gif & images/progress1.gif & images/progress_bg.gif
http://www.geocities.com/dsmportal/images/progress.gif
http://www.geocities.com/dsmportal/images/progress1.gif
http://www.geocities.com/dsmportal/images/progress_bg.gif
3) busybox.css
http://www.geocities.com/dsmportal/busybox.css
i hope this helps you
thanks
1) busybox.htm ( htm page (its include the javascript inside the page)
http://www.geocities.com/dsmportal/busybox.htm
2) images/progress.gif & images/progress1.gif & images/progress_bg.gif
http://www.geocities.com/dsmportal/images/progress.gif
http://www.geocities.com/dsmportal/images/progress1.gif
http://www.geocities.com/dsmportal/images/progress_bg.gif
3) busybox.css
http://www.geocities.com/dsmportal/busybox.css
i hope this helps you
thanks
How about this:
<body onLoad="pleaseWait()">
<script>
function pleaseWait(){
var theDiv = document.createElement("di v");
document.body.appendChild( theDiv);
divContent = "<div id='busy_box' align=center style='position:absolute; left:326px; top:275px; z-index:1'>";
divContent += "<div id='message_body'>Building data lists ...</div>";
divContent += "<div id='progress_bar'><img src='Images/progress.gif' width='189' height='11'></div>";
divContent += "</div>";
theDiv.innerHTML += divContent;
}
</script>
</body>
<body onLoad="pleaseWait()">
<script>
function pleaseWait(){
var theDiv = document.createElement("di
document.body.appendChild(
divContent = "<div id='busy_box' align=center style='position:absolute; left:326px; top:275px; z-index:1'>";
divContent += "<div id='message_body'>Building
divContent += "<div id='progress_bar'><img src='Images/progress.gif' width='189' height='11'></div>";
divContent += "</div>";
theDiv.innerHTML += divContent;
}
</script>
</body>
Or with CSS:
<style>
#waitDiv {
display: none;
position: absolute;
left: 326px;
top:275px;
z-index:1;
}
</style>
<script>
function pleaseWait(){
var theDiv = document.getElementById("w aitDiv");
theDiv.style.display="bloc k";
}
</script>
<body onLoad="pleaseWait()">
<div id="waitDiv">
<div id='message_body'>Building data lists ...</div>
<div id='progress_bar'><img src='Images/progress.gif' width='189' height='11'></div>
</div>
</body>
<style>
#waitDiv {
display: none;
position: absolute;
left: 326px;
top:275px;
z-index:1;
}
</style>
<script>
function pleaseWait(){
var theDiv = document.getElementById("w
theDiv.style.display="bloc
}
</script>
<body onLoad="pleaseWait()">
<div id="waitDiv">
<div id='message_body'>Building
<div id='progress_bar'><img src='Images/progress.gif' width='189' height='11'></div>
</div>
</body>
ASKER
Zvonko :
i get no errors but also i dont see anything in the screen
i tried both your examples
i get no errors but also i dont see anything in the screen
i tried both your examples
Check this:
<style>
#waitDiv {
display: block;
background-color: yellow;
position: absolute;
left: 326px;
top:275px;
z-index:1;
}
</style>
<script>
function pleaseWait(){
var theDiv = document.getElementById("w aitDiv");
theDiv.style.display="bloc k";
}
</script>
<body onLoad="pleaseWait()">
<div id="waitDiv">
<div id='message_body'>Building data lists ...</div>
<div id='progress_bar'><img src='http://www.geocities.com/dsmportal/images/progress.gif' width='189' height='11'></div>
</div>
</body>
<style>
#waitDiv {
display: block;
background-color: yellow;
position: absolute;
left: 326px;
top:275px;
z-index:1;
}
</style>
<script>
function pleaseWait(){
var theDiv = document.getElementById("w
theDiv.style.display="bloc
}
</script>
<body onLoad="pleaseWait()">
<div id="waitDiv">
<div id='message_body'>Building
<div id='progress_bar'><img src='http://www.geocities.com/dsmportal/images/progress.gif' width='189' height='11'></div>
</div>
</body>
ASKER
Zvonko : i hate to say that when i paste your code in my .aspx code i do not see anything at all
but when i put the same code in the html page its showing the progress bar.
in my aspx page, i have couple of drodownlist that take lot of time to load because of heavy duty load, thats the reason i wanted to have a progress bar or some sort of indication to the user that still loading the page
//here is my .aspx code
////////////////////////// ////start
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>People Reporting</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScri pt">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<LINK href="Images/busyBox/busyb ox_styles. css" type="text/css" rel="stylesheet">
<script language="javascript" src="Includes/Utilities.js "></script >
<script language="javascript" src="Includes/_MouseOver.j s"></scrip t>
<script type="text/javascript" language="javascript">
function pleaseWait(){
var theDiv = document.getElementById("w aitDiv");
theDiv.style.display="bloc k";
}
</script>
</HEAD>
<BODY onLoad="pleaseWait();" MS_POSITIONING="GridLayout ">
<div id="waitDiv">
<div id='busy_box' align=center style='position:absolute; left:326px; top:275px; z-index:1'>
<div id='message_body'>Building data lists ...</div>
<div id='progress_bar'><img src='http://www.geocities.com/dsmportal/images/progress.gif' width='189' height='11'></div>
</div>
<form id="Form2" method="post" runat="server">
<table id="tblQuerybyZipCode" style="Z-INDEX: 110; LEFT: 348px; WIDTH: 312px; POSITION: absolute; TOP: 216px; HEIGHT: 42px"
cellSpacing="0" cellPadding="0" width="312" border="0">
<TR>
<TD style="WIDTH: 47px"><asp:label id="lblZipCode" runat="server" Width="55px" Font-Names="Verdana" Font-Size="11px">Zip Code</asp:label></TD>
<TD></TD>
</TR>
</table>
<TABLE id="tblQueryFreeTextSearch " style="Z-INDEX: 112; LEFT: 342px; WIDTH: 320px; POSITION: absolute; TOP: 272px; HEIGHT: 56px"
cellSpacing="0" cellPadding="0" width="320" border="0">
<TR>
<TD></TD>
</TR>
</TABLE>
<TABLE id="tblCreateHeadingReport " style="Z-INDEX: 111; LEFT: 680px; WIDTH: 312px; POSITION: absolute; TOP: 216px; HEIGHT: 40px"
cellSpacing="0" cellPadding="0" width="312" border="0">
<TR>
<TD></TD>
</TR>
</TABLE>
<TABLE id="tblQuerybyAdditionalOp tions" style="Z-INDEX: 109; LEFT: 680px; WIDTH: 312px; POSITION: absolute; TOP: 80px; HEIGHT: 96px"
cellSpacing="0" cellPadding="0" width="312" border="0">
<TR>
<TD style="WIDTH: 76px; HEIGHT: 41px"><BR>
<asp:label id="lblCIO" runat="server" Width="56px" Font-Names="Verdana" Font-Size="11px">CIO</asp: label></TD >
<TD style="WIDTH: 199px; HEIGHT: 41px"></TD>
</TR>
<TR>
<TD style="WIDTH: 76px; HEIGHT: 24px"><asp:label id="lblEmpType" runat="server" Width="65px" Font-Names="Verdana" Font-Size="11px">Emp Type</asp:label></TD>
<TD style="WIDTH: 199px; HEIGHT: 24px"></TD>
</TR>
<TR>
<TD style="WIDTH: 76px"></TD>
<TD style="WIDTH: 199px"></TD>
</TR>
</TABLE>
<TABLE id="tblQuerybyGeography" style="Z-INDEX: 108; LEFT: 348px; WIDTH: 312px; POSITION: absolute; TOP: 88px; HEIGHT: 88px; Design_Time_Lock: True"
cellSpacing="0" cellPadding="0" width="312" border="0" Design_Time_Lock="True">
<TR>
<TD style="WIDTH: 56px; HEIGHT: 29px"><BR>
<asp:label id="lblCountry" runat="server" Width="40px" Font-Names="Verdana" Font-Size="11px">Country</ asp:label> </TD>
<TD style="HEIGHT: 29px"><asp:dropdownlist id="ddlCountry" style="Z-INDEX: 107; LEFT: 61px; POSITION: absolute; TOP: 12px; Design_Time_Lock: True"
runat="server" Width="248" Design_Time_Lock="True" Height="88" AutoPostBack="True"></asp: dropdownli st></TD>
</TR>
<TR>
<TD style="WIDTH: 56px; HEIGHT: 25px"><asp:label id="lblState" runat="server" Width="40px" Font-Names="Verdana" Font-Size="11px">State</as p:label></ TD>
<TD style="HEIGHT: 25px" colSpan="1"><asp:dropdownl ist id="ddlState" style="Z-INDEX: 107; LEFT: 61px; POSITION: absolute; TOP: 36px; Design_Time_Lock: True"
runat="server" Width="248" Design_Time_Lock="True" Height="88" AutoPostBack="True" Enabled="False"></asp:drop downlist>< /TD>
</TR>
<TR>
<TD style="WIDTH: 56px"><asp:label id="lblCity" runat="server" Width="32px" Font-Names="Verdana" Font-Size="11px">City</asp :label></T D>
<TD></TD>
</TR>
</TABLE>
<TABLE id="tblQuerybyOrganization " style="Z-INDEX: 107; LEFT: 16px; WIDTH: 312px; POSITION: absolute; TOP: 88px; HEIGHT: 168px; Design_Time_Lock: True"
cellSpacing="0" cellPadding="0" width="312" border="0" Design_Time_Lock="True">
<TR>
<TD style="WIDTH: 90px; HEIGHT: 29px"><asp:label id="lblCategory" runat="server" Width="56px" Font-Names="Verdana" Font-Size="11px"> Category</asp:label></TD>
<TD style="HEIGHT: 29px"> <asp:dropdownl ist id="ddlCategory" style="Z-INDEX: 107; LEFT: 98px; POSITION: absolute; TOP: 6px; Design_Time_Lock: True"
runat="server" Width="211" Design_Time_Lock="True" Height="88" AutoPostBack="True"></asp: dropdownli st>
</TD>
</TR>
<TR>
<TD style="WIDTH: 90px"><asp:label id="lblOrg" runat="server" Width="48px" Font-Names="Verdana" Font-Size="11px">Organizat ion</asp:l abel></TD>
<TD> <asp:dropdownlis t id="ddlOrganization" style="Z-INDEX: 107; LEFT: 98px; POSITION: absolute; TOP: 37px; Design_Time_Lock: True"
runat="server" Width="211" Design_Time_Lock="True" Height="88" AutoPostBack="True" Enabled="False"></asp:drop downlist>
</TD>
</TR>
<TR>
<TD style="WIDTH: 90px; HEIGHT: 42px"><BR>
<asp:label id="lblCampus" runat="server" Width="48px" Font-Names="Verdana" Font-Size="11px">Campus</a sp:label>< /TD>
<TD style="HEIGHT: 42px"><BR>
<asp:dropdownl ist id="ddlCampus" style="Z-INDEX: 107; LEFT: 98px; POSITION: absolute; TOP: 82px; Design_Time_Lock: True"
runat="server" Width="211" Design_Time_Lock="True" Height="88" AutoPostBack="True" Enabled="False"></asp:drop downlist>< /TD>
</TR>
<TR>
<TD style="WIDTH: 90px; HEIGHT: 27px"><asp:label id="lblBuilding" runat="server" Width="48px" Font-Names="Verdana" Font-Size="11px">Building< /asp:label ></TD>
<TD style="HEIGHT: 27px"> <asp:dropdownl ist id="ddlBuilding" style="Z-INDEX: 107; LEFT: 98px; POSITION: absolute; TOP: 110px; Design_Time_Lock: True"
runat="server" Width="211" Design_Time_Lock="True" Height="88" AutoPostBack="True" Enabled="False"></asp:drop downlist>< /TD>
</TR>
<TR>
<TD style="WIDTH: 90px"><asp:label id="lblFloor" runat="server" Width="48px" Font-Names="Verdana" Font-Size="11px">Floor</as p:label></ TD>
<TD> <asp:dropdownlis t id="ddlFloor" style="Z-INDEX: 107; LEFT: 98px; POSITION: absolute; TOP: 139px; Design_Time_Lock: True"
runat="server" Width="211" Design_Time_Lock="True" Height="88" Enabled="False"></asp:drop downlist>< /TD>
</TR>
</TABLE>
<asp:panel id="pnlReport" style="Z-INDEX: 102; LEFT: 5px; POSITION: absolute; TOP: 424px; Design_Time_Lock: True"
runat="server" Width="1009px" Design_Time_Lock="True" Height="285px" Visible="False">
<cc1:ReportViewer id="ReportViewer1" runat="server" Width="100%" Height="100%" Parameters="False"
Zoom="100%"></cc1:ReportVi ewer>
</asp:panel><asp:panel id="pnlPrivacyLink" style="Z-INDEX: 113; LEFT: 16px; POSITION: absolute; TOP: 8px"
runat="server" Width="992px" Height="32px">
<TABLE align="center" ID="Table1">
<TR>
<TD>
<asp:HyperLink id="hyperlink_Privacy" runat="server" ImageUrl="Images/privacy_l ink.gif" NavigateUrl="PrivacyLink_P opup.aspx" >HyperLink </asp:Hype rLink></TD >
</TR>
</TABLE>
</asp:panel>
<TABLE id="tblMain" style="Z-INDEX: 103; LEFT: 10px; POSITION: absolute; TOP: 56px; Design_Time_Lock: True"
cellSpacing="0" cellPadding="0" bgColor="white" border="0" Design_Time_Lock="True">
<TR>
<td><asp:image id="imgSearchCriteria" runat="server" ImageUrl="Images/PeopleRep ort_Search Criteria.g if"></asp: image></td >
</TR>
</TABLE>
<asp:imagebutton id="imgbtnGenerate" style="Z-INDEX: 114; LEFT: 752px; POSITION: absolute; TOP: 280px; Design_Time_Lock: True"
runat="server" Design_Time_Lock="True" ImageUrl="images\PeopleRep ort_button _generate. gif" CssClass="borderless"
ToolTip="Generate a report"></asp:imagebutton> <asp:image button id="imgbtnReset" style="Z-INDEX: 104; LEFT: 680px; POSITION: absolute; TOP: 280px; Design_Time_Lock: True"
runat="server" Design_Time_Lock="True" ImageUrl="images\PeopleRep ort_button _reset.gif " CssClass="borderless" ToolTip="Reset all the search criteria"
CausesValidation="False">< /asp:image button><as p:image id="imgReportControl" style="Z-INDEX: 105; LEFT: 2px; POSITION: absolute; TOP: 344px"
runat="server" Width="1000px" ImageUrl="Images/PeopleRep ort_Report _Control.g if"></asp: image><asp :imagebutt on id="imgbtnNewWindow" style="Z-INDEX: 106; LEFT: 872px; POSITION: absolute; TOP: 280px; Design_Time_Lock: True"
runat="server" Design_Time_Lock="True" ImageUrl="images\PeopleRep ort_button _new_windo w.gif" CssClass="borderless" ToolTip="Open in a new window"></asp:imagebutton> <asp:dropd ownlist id="ddlCity" style="Z-INDEX: 101; LEFT: 408px; POSITION: absolute; TOP: 148px; Design_Time_Lock: True"
runat="server" Width="248px" Design_Time_Lock="True" Enabled="False"></asp:drop downlist>< asp:dropdo wnlist id="ddlEmployeeType" style="Z-INDEX: 115; LEFT: 776px; POSITION: absolute; TOP: 123px"
runat="server" Width="211px"></asp:dropdo wnlist><as p:dropdown list id="ddlCIO" style="Z-INDEX: 116; LEFT: 776px; POSITION: absolute; TOP: 99px; Design_Time_Lock: True"
runat="server" Width="211px" Design_Time_Lock="True"></ asp:dropdo wnlist><as p:textbox id="txtReportTitle" style="Z-INDEX: 117; LEFT: 680px; POSITION: absolute; TOP: 224px"
runat="server" Width="304px" Height="21px"></asp:textbo x><asp:tex tbox id="txtZipCode" style="Z-INDEX: 118; LEFT: 408px; POSITION: absolute; TOP: 228px"
runat="server" Width="110px" Height="21px" MaxLength="5"></asp:textbo x><asp:lab el id="lblZipCodeExample" style="Z-INDEX: 119; LEFT: 520px; POSITION: absolute; TOP: 232px"
runat="server" Width="104px" Font-Names="Verdana" Font-Size="9px" Font-Italic="True">example : 3 or 30329</asp:label><asp:text box id="txtFreeSearch" style="Z-INDEX: 120; LEFT: 349px; POSITION: absolute; TOP: 284px; Design_Time_Lock: True"
runat="server" Width="308px" Design_Time_Lock="True" Height="21px"></asp:textbo x>
<asp:regularexpressionvali dator id="RegularExpressionValid ator1" style="Z-INDEX: 121; LEFT: 624px; POSITION: absolute; TOP: 232px"
runat="server" Width="8px" Font-Size="Smaller" ValidationExpression="^[0- 9]*$" ControlToValidate="txtZipC ode"
ErrorMessage="Enter Zip Code" Display="Dynamic">*</asp:r egularexpr essionvali dator><asp :validatio nsummary id="ValidationSummary1" style="Z-INDEX: 122; LEFT: 656px; POSITION: absolute; TOP: 304px"
runat="server" Width="147px" Height="24px"></asp:valida tionsummar y>
</form>
</BODY>
</HTML>
////////////////////////// ////end
but when i put the same code in the html page its showing the progress bar.
in my aspx page, i have couple of drodownlist that take lot of time to load because of heavy duty load, thats the reason i wanted to have a progress bar or some sort of indication to the user that still loading the page
//here is my .aspx code
//////////////////////////
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>People Reporting</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScri
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<LINK href="Images/busyBox/busyb
<script language="javascript" src="Includes/Utilities.js
<script language="javascript" src="Includes/_MouseOver.j
<script type="text/javascript" language="javascript">
function pleaseWait(){
var theDiv = document.getElementById("w
theDiv.style.display="bloc
}
</script>
</HEAD>
<BODY onLoad="pleaseWait();" MS_POSITIONING="GridLayout
<div id="waitDiv">
<div id='busy_box' align=center style='position:absolute; left:326px; top:275px; z-index:1'>
<div id='message_body'>Building
<div id='progress_bar'><img src='http://www.geocities.com/dsmportal/images/progress.gif' width='189' height='11'></div>
</div>
<form id="Form2" method="post" runat="server">
<table id="tblQuerybyZipCode" style="Z-INDEX: 110; LEFT: 348px; WIDTH: 312px; POSITION: absolute; TOP: 216px; HEIGHT: 42px"
cellSpacing="0" cellPadding="0" width="312" border="0">
<TR>
<TD style="WIDTH: 47px"><asp:label id="lblZipCode" runat="server" Width="55px" Font-Names="Verdana" Font-Size="11px">Zip Code</asp:label></TD>
<TD></TD>
</TR>
</table>
<TABLE id="tblQueryFreeTextSearch
cellSpacing="0" cellPadding="0" width="320" border="0">
<TR>
<TD></TD>
</TR>
</TABLE>
<TABLE id="tblCreateHeadingReport
cellSpacing="0" cellPadding="0" width="312" border="0">
<TR>
<TD></TD>
</TR>
</TABLE>
<TABLE id="tblQuerybyAdditionalOp
cellSpacing="0" cellPadding="0" width="312" border="0">
<TR>
<TD style="WIDTH: 76px; HEIGHT: 41px"><BR>
<asp:label id="lblCIO" runat="server" Width="56px" Font-Names="Verdana" Font-Size="11px">CIO</asp:
<TD style="WIDTH: 199px; HEIGHT: 41px"></TD>
</TR>
<TR>
<TD style="WIDTH: 76px; HEIGHT: 24px"><asp:label id="lblEmpType" runat="server" Width="65px" Font-Names="Verdana" Font-Size="11px">Emp Type</asp:label></TD>
<TD style="WIDTH: 199px; HEIGHT: 24px"></TD>
</TR>
<TR>
<TD style="WIDTH: 76px"></TD>
<TD style="WIDTH: 199px"></TD>
</TR>
</TABLE>
<TABLE id="tblQuerybyGeography" style="Z-INDEX: 108; LEFT: 348px; WIDTH: 312px; POSITION: absolute; TOP: 88px; HEIGHT: 88px; Design_Time_Lock: True"
cellSpacing="0" cellPadding="0" width="312" border="0" Design_Time_Lock="True">
<TR>
<TD style="WIDTH: 56px; HEIGHT: 29px"><BR>
<asp:label id="lblCountry" runat="server" Width="40px" Font-Names="Verdana" Font-Size="11px">Country</
<TD style="HEIGHT: 29px"><asp:dropdownlist id="ddlCountry" style="Z-INDEX: 107; LEFT: 61px; POSITION: absolute; TOP: 12px; Design_Time_Lock: True"
runat="server" Width="248" Design_Time_Lock="True" Height="88" AutoPostBack="True"></asp:
</TR>
<TR>
<TD style="WIDTH: 56px; HEIGHT: 25px"><asp:label id="lblState" runat="server" Width="40px" Font-Names="Verdana" Font-Size="11px">State</as
<TD style="HEIGHT: 25px" colSpan="1"><asp:dropdownl
runat="server" Width="248" Design_Time_Lock="True" Height="88" AutoPostBack="True" Enabled="False"></asp:drop
</TR>
<TR>
<TD style="WIDTH: 56px"><asp:label id="lblCity" runat="server" Width="32px" Font-Names="Verdana" Font-Size="11px">City</asp
<TD></TD>
</TR>
</TABLE>
<TABLE id="tblQuerybyOrganization
cellSpacing="0" cellPadding="0" width="312" border="0" Design_Time_Lock="True">
<TR>
<TD style="WIDTH: 90px; HEIGHT: 29px"><asp:label id="lblCategory" runat="server" Width="56px" Font-Names="Verdana" Font-Size="11px"> Category</asp:label></TD>
<TD style="HEIGHT: 29px"> <asp:dropdownl
runat="server" Width="211" Design_Time_Lock="True" Height="88" AutoPostBack="True"></asp:
</TD>
</TR>
<TR>
<TD style="WIDTH: 90px"><asp:label id="lblOrg" runat="server" Width="48px" Font-Names="Verdana" Font-Size="11px">Organizat
<TD> <asp:dropdownlis
runat="server" Width="211" Design_Time_Lock="True" Height="88" AutoPostBack="True" Enabled="False"></asp:drop
</TD>
</TR>
<TR>
<TD style="WIDTH: 90px; HEIGHT: 42px"><BR>
<asp:label id="lblCampus" runat="server" Width="48px" Font-Names="Verdana" Font-Size="11px">Campus</a
<TD style="HEIGHT: 42px"><BR>
<asp:dropdownl
runat="server" Width="211" Design_Time_Lock="True" Height="88" AutoPostBack="True" Enabled="False"></asp:drop
</TR>
<TR>
<TD style="WIDTH: 90px; HEIGHT: 27px"><asp:label id="lblBuilding" runat="server" Width="48px" Font-Names="Verdana" Font-Size="11px">Building<
<TD style="HEIGHT: 27px"> <asp:dropdownl
runat="server" Width="211" Design_Time_Lock="True" Height="88" AutoPostBack="True" Enabled="False"></asp:drop
</TR>
<TR>
<TD style="WIDTH: 90px"><asp:label id="lblFloor" runat="server" Width="48px" Font-Names="Verdana" Font-Size="11px">Floor</as
<TD> <asp:dropdownlis
runat="server" Width="211" Design_Time_Lock="True" Height="88" Enabled="False"></asp:drop
</TR>
</TABLE>
<asp:panel id="pnlReport" style="Z-INDEX: 102; LEFT: 5px; POSITION: absolute; TOP: 424px; Design_Time_Lock: True"
runat="server" Width="1009px" Design_Time_Lock="True" Height="285px" Visible="False">
<cc1:ReportViewer id="ReportViewer1" runat="server" Width="100%" Height="100%" Parameters="False"
Zoom="100%"></cc1:ReportVi
</asp:panel><asp:panel id="pnlPrivacyLink" style="Z-INDEX: 113; LEFT: 16px; POSITION: absolute; TOP: 8px"
runat="server" Width="992px" Height="32px">
<TABLE align="center" ID="Table1">
<TR>
<TD>
<asp:HyperLink id="hyperlink_Privacy" runat="server" ImageUrl="Images/privacy_l
</TR>
</TABLE>
</asp:panel>
<TABLE id="tblMain" style="Z-INDEX: 103; LEFT: 10px; POSITION: absolute; TOP: 56px; Design_Time_Lock: True"
cellSpacing="0" cellPadding="0" bgColor="white" border="0" Design_Time_Lock="True">
<TR>
<td><asp:image id="imgSearchCriteria" runat="server" ImageUrl="Images/PeopleRep
</TR>
</TABLE>
<asp:imagebutton id="imgbtnGenerate" style="Z-INDEX: 114; LEFT: 752px; POSITION: absolute; TOP: 280px; Design_Time_Lock: True"
runat="server" Design_Time_Lock="True" ImageUrl="images\PeopleRep
ToolTip="Generate a report"></asp:imagebutton>
runat="server" Design_Time_Lock="True" ImageUrl="images\PeopleRep
CausesValidation="False"><
runat="server" Width="1000px" ImageUrl="Images/PeopleRep
runat="server" Design_Time_Lock="True" ImageUrl="images\PeopleRep
runat="server" Width="248px" Design_Time_Lock="True" Enabled="False"></asp:drop
runat="server" Width="211px"></asp:dropdo
runat="server" Width="211px" Design_Time_Lock="True"></
runat="server" Width="304px" Height="21px"></asp:textbo
runat="server" Width="110px" Height="21px" MaxLength="5"></asp:textbo
runat="server" Width="104px" Font-Names="Verdana" Font-Size="9px" Font-Italic="True">example
runat="server" Width="308px" Design_Time_Lock="True" Height="21px"></asp:textbo
<asp:regularexpressionvali
runat="server" Width="8px" Font-Size="Smaller" ValidationExpression="^[0-
ErrorMessage="Enter Zip Code" Display="Dynamic">*</asp:r
runat="server" Width="147px" Height="24px"></asp:valida
</form>
</BODY>
</HTML>
//////////////////////////
Check then this:
<script type="text/javascript" language="javascript">
function waitFinished(){
var theDiv = document.getElementById("w aitDiv");
theDiv.style.display="none ";
}
</script>
</HEAD>
<BODY onLoad="waitFinished();" MS_POSITIONING="GridLayout ">
<div id="waitDiv"align=center style='position:absolute; left:326px; top:275px; z-index:1'>
<div id='message_body'>Building data lists ...</div>
<div id='progress_bar'><img src='http://www.geocities.com/dsmportal/images/progress.gif' width='189' height='11'></div>
</div>
<script type="text/javascript" language="javascript">
function waitFinished(){
var theDiv = document.getElementById("w
theDiv.style.display="none
}
</script>
</HEAD>
<BODY onLoad="waitFinished();" MS_POSITIONING="GridLayout
<div id="waitDiv"align=center style='position:absolute; left:326px; top:275px; z-index:1'>
<div id='message_body'>Building
<div id='progress_bar'><img src='http://www.geocities.com/dsmportal/images/progress.gif' width='189' height='11'></div>
</div>
ASKER
eggggrrrrrrrrrrrrrrrrrrrr
its sucking ur time and mine and very frustration
:(
its not displaying any div
what do you think and i know that you are expert in javascript what do you suggest me?
im only trying to give some sort of message when the dropdownlist still loading
do you think you have some thing other good solution?
im ready to scrap if you want to and i can open a new question
thanks dude for ur help and i really really appreciate
its sucking ur time and mine and very frustration
:(
its not displaying any div
what do you think and i know that you are expert in javascript what do you suggest me?
im only trying to give some sort of message when the dropdownlist still loading
do you think you have some thing other good solution?
im ready to scrap if you want to and i can open a new question
thanks dude for ur help and i really really appreciate
Now that I see what you want to get, I see also what your problem is.
As long as page is loading you cannot do much display handling.
My last upper try was a hope that default html setting will show the wait gif and hide it at onLoad page finished.
But that seams not to happen for a busy havy loading page.
The only advice that I can give to you before I go to bed is this:
make a trivial wait.html page which imediately redirects to your havy loading aspx page.
on that trivial page you can have the wait gif.
Like this:
<BODY onLoad="location='https://www.experts-exchange.com/';//or your aspx">
<div id="waitDiv"align=center style='position:absolute; left:326px; top:275px; z-index:1'>
<div id='message_body'>Building data lists ...</div>
<div id='progress_bar'><img src='http://www.geocities.com/dsmportal/images/progress.gif' width='189' height='11'></div>
</div>
</body>
Good Night!
As long as page is loading you cannot do much display handling.
My last upper try was a hope that default html setting will show the wait gif and hide it at onLoad page finished.
But that seams not to happen for a busy havy loading page.
The only advice that I can give to you before I go to bed is this:
make a trivial wait.html page which imediately redirects to your havy loading aspx page.
on that trivial page you can have the wait gif.
Like this:
<BODY onLoad="location='https://www.experts-exchange.com/';//or your aspx">
<div id="waitDiv"align=center style='position:absolute; left:326px; top:275px; z-index:1'>
<div id='message_body'>Building
<div id='progress_bar'><img src='http://www.geocities.com/dsmportal/images/progress.gif' width='189' height='11'></div>
</div>
</body>
Good Night!
ASKER
my boss does not want to have a seperat html page to display "please wait...or image"
what do you this point.
thanks
what do you this point.
thanks
Then you have to do more tricks on same page.
The trick is that you FLUSH the output after the upper first part is written, and after the flush you continue the output on the same page. Then you need no redirect. But need to hide the first part as described before in the onLoad event handler.
But I cannot test that scenario for you.
The trick is that you FLUSH the output after the upper first part is written, and after the flush you continue the output on the same page. Then you need no redirect. But need to hide the first part as described before in the onLoad event handler.
But I cannot test that scenario for you.
ASKER
do you have or do you know or any links that have similar scenario they come across?
please wait message when its loading or i should say how about gmail thing... you get "loading... " message whenever you logon to gmail account
something like this.... im flexible to change, i dont mind using text rather then image
what do you think?
thanks for reply.
please wait message when its loading or i should say how about gmail thing... you get "loading... " message whenever you logon to gmail account
something like this.... im flexible to change, i dont mind using text rather then image
what do you think?
thanks for reply.
ASKER
i scrap the idea of implementing the above question but still i thanks to Zvonko
You are welcome.
ASKER
//
// RenderContent:
// This method is used when the default busy box layout is used; not a custom
// layout. This method is called when the url argument for the constructor is null.
BusyBox.prototype.RenderCo
{
// Get the IFrame document object
var doc = this.GetIFrameDocument();
//OLD CODE COMMENT
//var style = " style='BORDER: navy 1px solid; POSITION: absolute;' ";
//NEW CODE HERE
var style = "style= body {margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;}" //" style='BORDER: navy 1px solid; POSITION: absolute;' ";
//NEW CODE HERE
doc.open();
doc.writeln("<body ondragstart='return false;' style='Margin: 0px; Background-Color: white'>");
doc.writeln(" <div id='" + this.DivID + "' align=center style='position:absolute; left:326px; top:275px; z-index:1'>");
doc.writeln(" <img id='" + this.ImgID + "' src='Images/progress.gif' width='189' height='11''>");
doc.writeln(" <div id='" + this.ImgID + "' >Building data lists ...</div>");
doc.writeln(" </div>");
doc.writeln("</body>");
doc.close();
/* // OLD CODE
doc.open();
doc.writeln("<body ondragstart='return false;' style='Margin: 0px; Background-Color: white'>");
doc.writeln(" <div id='" + this.DivID + "' align=center " + style + ">");
doc.writeln(" <img id='" + this.ImgID + "' src=''>");
doc.writeln(" <br><h5>processing...</h5>
doc.writeln(" </div>");
doc.writeln("</body>");
doc.close();*/
/*
}