Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jhermiz
3564 Posts |
Posted - 2008-02-11 : 11:35:18
|
I need a simple client side script that allows me to say "Please wait loading data" or have a hidden image pop up that displays a progress bar when I click an ASP.net image button.Basically I have a lot of data coming back from a database and upon clicking the Submit button I want to load a gif / image that shows that we are waiting on data. Once the load is complete to hide this gif?I know Jeff showed me an example a while back but that was for an IFRAME and there was a BodyLoad event. Now I just need an image to load on the click of a Submit button (which is an image button in asp.net 2.0) and to unload or hide the image once the data is complete.Weblog -- [url]http://weblogs.sqlteam.com/jhermiz[/url] |
|
jdaman
Constraint Violating Yak Guru
354 Posts |
Posted - 2008-02-11 : 11:40:12
|
Look at using AJAX with asp.net: http://www.asp.net/ajax/ I believe that they show how you can do what youre asking for in one of their example videos. |
|
|
jhermiz
3564 Posts |
Posted - 2008-02-11 : 11:43:27
|
quote: Originally posted by jdaman Look at using AJAX with asp.net: http://www.asp.net/ajax/ I believe that they show how you can do what youre asking for in one of their example videos.
ive seen that already and cant use it as this website is non ajaxable :). It is an old site they want me to do some updates on...Weblog -- [url]http://weblogs.sqlteam.com/jhermiz[/url] |
|
|
jhermiz
3564 Posts |
Posted - 2008-02-11 : 12:13:18
|
Well I kind of got it like this: <asp:ImageButton ID="ibSubmit" runat="server" ImageUrl="images/submit.gif" OnClientClick="return rpt_onclick()" /><div id="waiting"> <strong><span style="color: #24618e"> <img src="images/redirect.gif" alt="Data is loading..." /> Please wait loading data...</span></strong></div><script type="text/javascript"> function test() { document.getElementById('waiting').style.display='none'; } function rpt_onclick() {document.getElementById('waiting').style.display='block';} Problem is this image is an animated gif but it isnt animating :(Any clue as to why ?Weblog -- [url]http://weblogs.sqlteam.com/jhermiz[/url] |
|
|
jhermiz
3564 Posts |
Posted - 2008-02-11 : 21:01:09
|
quote: Originally posted by jhermiz Well I kind of got it like this: <asp:ImageButton ID="ibSubmit" runat="server" ImageUrl="images/submit.gif" OnClientClick="return rpt_onclick()" /><div id="waiting"> <strong><span style="color: #24618e"> <img src="images/redirect.gif" alt="Data is loading..." /> Please wait loading data...</span></strong></div><script type="text/javascript"> function test() { document.getElementById('waiting').style.display='none'; } function rpt_onclick() {document.getElementById('waiting').style.display='block';} Problem is this image is an animated gif but it isnt animating :(Any clue as to why ?Weblog -- [url]http://weblogs.sqlteam.com/jhermiz[/url]
I can get it to animate only if I place false; under the document.getElementByID portion...but this wont work as the false; stops my image buttons code from executing...Anyone with any ideas to get this worked out...Weblog -- [url]http://weblogs.sqlteam.com/jhermiz[/url] |
|
|
|
|
|