User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 425,932 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,638 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1106 | Replies: 3
Reply
Join Date: Apr 2007
Posts: 26
Reputation: BalagurunathanS is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
BalagurunathanS's Avatar
BalagurunathanS BalagurunathanS is offline Offline
Light Poster

Timer Problem in Javascript

  #1  
Sep 3rd, 2007
Hi Friends.
I am using javascript to display timer in my .aspx page..I also use javascript to do validations in that page.when i alert the user with a message.i.e when alert function is called,the timer stops and becomes idle.Again when i click the ok button of the message box that occured as a result of alert function ,the timer starts ticking again from where it had left earlier..Time deviation occurs due to this..How to solve it? Someone help in this regard as early as possible..


Thanks & Regards,

Balaguru
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,855
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 344
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: Timer Problem in Javascript

  #2  
Sep 3rd, 2007
AFAIK, alert() being a blocking function will bring all the processing to a grinding halt. So, to keep the timer running when the alert() is pending for an user action seems to be a pretty difficult task.

One way you can get around this is to display an error message in a custom dialog box (made of div) or display the error message in a span instead of doing an alert.

But as I always say, client side validation is completely at the mercy of the client and is a moot point. Server side validation is the way to go.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Join Date: Apr 2007
Posts: 26
Reputation: BalagurunathanS is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
BalagurunathanS's Avatar
BalagurunathanS BalagurunathanS is offline Offline
Light Poster

Re: Timer Problem in Javascript

  #3  
Sep 4th, 2007
Hi ..

I have no idea with that custom message box.How to do it..?
Kindly provide me with some sample script if u have..

Regards,
Balagurunathan S
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,855
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 344
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: Timer Problem in Javascript

  #4  
Sep 4th, 2007
For displaying a custom dialog box, you need to use an external javascript library like YUI, Prototype.js, Mootools etc. Here is a simple example using the YUI javascript library.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 9:14 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC