praveenuni
asked on
Loading -- DIV Tags
Hello,
I'm developing an application which will do several postbacks. Some of them are taking more time. During this time, I want to display "Loading...Please wait" message to the user using DIV tags. How can I do this?
Thanks
I'm developing an application which will do several postbacks. Some of them are taking more time. During this time, I want to display "Loading...Please wait" message to the user using DIV tags. How can I do this?
Thanks
Create a DIV tag and set display=hidden. Use client-side script to make the DIV visible on the button click (before the postback).
ASKER
can you please show me how to do that ?
Thanks
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you very much for the info. I want to show the div on every page load, not only on a button click. So how can I do this?
So you want to show the div during the page load and then hide it once the page is loaded?
ASKER
yes that is correct.
Create the DIV so it is visible...
<DIV id="divWait" ms_positioning="FlowLayout ">Loading. ...Please wait</DIV>
When the page is done loading, use the client-side javascript to hide the DIV....
<body onload='HideDiv();'>
<DIV id="divWait" ms_positioning="FlowLayout
When the page is done loading, use the client-side javascript to hide the DIV....
<body onload='HideDiv();'>
ASKER
where should I put this statement: <DIV id="divWait" ms_positioning="FlowLayout ">Loading. ...Please wait</DIV>.
I want to appear this div in the center of the page and how can I control the font size and color for Loading..
Thanks
I want to appear this div in the center of the page and how can I control the font size and color for Loading..
Thanks
1. Place it in the HTML whever you want it to appear.
2. You can control the appearance using the STYLE attribute.
2. You can control the appearance using the STYLE attribute.
ASKER
I tried this, but in the hide function, its giving page error saying "Object Expected"
Any suggestions
Any suggestions
Sounds like it can't find the div called divWait.... have you placed it on the page? Did you keep the same name?
ASKER
yes, I kept the same name and placed it under the body tag.
use this code .. it should work
<HTML>
.......
<body MS_POSITIONING="GridLayout " onload="javascript:documen t.getEleme ntById('di vWait').st yle.visibi lity = 'hidden';">
<DIV id="divWait" ms_positioning="FlowLayout ">Loading. ...Please wait</DIV>
<HTML>
.......
<body MS_POSITIONING="GridLayout
<DIV id="divWait" ms_positioning="FlowLayout
ASKER
This one is working fine. But loading.. tag is not appearing as soon as the user clicks any button or do any postback. It is appearing only after the request and postback completed. It is appearing and disappearing in just a second.
Any suggestions
Thanks
Any suggestions
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
note, the response.flush is very important .. also after u do a flush, if u try to redirect to another page, u will get an error ..