473,396 Members | 1,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Javascript event for Atlas page load

Hi all,

I have been struggling with this problem from a few days. I hope I
will get some help here.

I am developing an online quiz portal with ASP.NET 2.0 and I am using
Atlas framework for rich UI.

I was in need of a timer control which keeps track of the quiz time
and sends a post back when the time expires!
For this purpose I am using Cronometro control by Manuel Abadia in
Code Project (http://www.codeproject.com/aspnet/dhtml_timer.asp)

Now the issue is that when there is an AJAX postback I want the timer
to pause till the page reloads. I could pause this timer with
javascript but I dont see any way to unpause it when the page loads
back because it is an AJAX page load and I dont know if there is a way
to run javascript in this event.

Could some one tell me if there is a way to run javascript on AJAX
page reloads?
Another solution could be to use a different timer control which
automatically pauses on AJAX calls. If anyone knows of such a control
could you share with me?

I know I can do this without using AJAX/Atlas at all but I am trying
if I could

Thanks in advance
--
Satish Vellanki

Mar 26 '07 #1
2 1632
On Mar 26, 11:53 pm, "Surya Vellanki" <surya.the...@gmail.comwrote:
Hi all,

I have been struggling with this problem from a few days. I hope I
will get some help here.
[snip]
I could help you, but you're not gonna like the answer... ;)

Ditch ASP.NET Ajax and use a REAL ajax framework...

http://ajaxwidgets.com/AllControlsSamples/Timer.aspx

..t

Mar 26 '07 #2
After an ASP.NET AJAX asynchronous postback you could use the Page Request
Manager's EndRequestHandler event to restart your timer.

So something along these lines should do it:

var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args)
{
restartTimer();
}

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"Surya Vellanki" <su**********@gmail.comwrote in message
news:11**********************@n76g2000hsh.googlegr oups.com...
Hi all,

I have been struggling with this problem from a few days. I hope I
will get some help here.

I am developing an online quiz portal with ASP.NET 2.0 and I am using
Atlas framework for rich UI.

I was in need of a timer control which keeps track of the quiz time
and sends a post back when the time expires!
For this purpose I am using Cronometro control by Manuel Abadia in
Code Project (http://www.codeproject.com/aspnet/dhtml_timer.asp)

Now the issue is that when there is an AJAX postback I want the timer
to pause till the page reloads. I could pause this timer with
javascript but I dont see any way to unpause it when the page loads
back because it is an AJAX page load and I dont know if there is a way
to run javascript in this event.

Could some one tell me if there is a way to run javascript on AJAX
page reloads?
Another solution could be to use a different timer control which
automatically pauses on AJAX calls. If anyone knows of such a control
could you share with me?

I know I can do this without using AJAX/Atlas at all but I am trying
if I could

Thanks in advance
--
Satish Vellanki
Mar 26 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Erik Steffl | last post by:
I am trying to create a simple custom web spider using mozilla and javascript, the basic functionality is to open a website and then manipulate it using DOM (possibly opening links etc.). it...
6
by: sylcheung | last post by:
Hi, How can I be notified when the document load is complet in JavaScript? I am referring to the whold document load is complete, mean all images/external files/frame/iframes have been loaded. ...
1
by: Ronde | last post by:
Hi all, I am in a such situation that requires before Atlas do the Partical/Atlas postback, a Client-Side JavaScript has to be executed first, once the JavaScript execute successfully, the...
0
by: Vincent Courcelle | last post by:
Hello, I'm using the Atlas framework to build some dynamic applications. I need to call a javascript method when datas arrives (but after Atlas renders the result). It is possible to do so ? ...
2
by: Tina | last post by:
I'm trying to get started with Atlas and associated necessary javascript at the same time. I started out at http://atlas.asp.net/walkthroughs/gettingstarted/basic.net where they have an...
0
by: Daniel | last post by:
I wrote a pretty neat website today that can utilize no postback AJAXIAN type features. Basically to populate a drop down with a web service call that hits a SQL server, based off the change of...
4
by: Brad Baker | last post by:
I'm trying to implement a gridview control using atlas & asp.net per the following article: http://weblogs.asp.net/scottgu/archive/2005/12/26/433997.aspx My frustration is that the page I've...
0
by: Muralidharan Ramakrishnan | last post by:
Hi, 1) I have a Asp.net 2.0 web form and with 2 labels in it. The first label is loaded from a local resource at App_LocalResourcesFolder. 2) The page has both culture and uiculture set to...
5
by: =?Utf-8?B?TWF0Y29u?= | last post by:
Hello, I have a asp.net 2.0 (vb.net) page, which uses a master page, and there is a javascript function (myfunction) defined in the <headof that master page. Is there a way to run the function...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.