•
•
•
•
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
![]() |
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
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
AFAIK,
One way you can get around this is to display an error message in a custom dialog box (made of
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.
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.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
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.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Generating clientside javascript (ASP)
- javascript links freezing/lagging computer. (Web Browsers)
- problem in javascript coding in asp page (ASP)
- Javascript event & color change problem (JavaScript / DHTML / AJAX)
- Add textbox to editable div problem (JavaScript / DHTML / AJAX)
- Using Javascript code in ASP.NET (JavaScript / DHTML / AJAX)
- Help: Only last loaded javascript runs (JavaScript / DHTML / AJAX)
- IE6 & XPsp2 refresh problem (Web Browsers)
- Page Cannot Be Displayed & javascript:doNetDetect() Errors (Viruses, Spyware and other Nasties)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: call vb.exe from javascript
- Next Thread: Clickable Hyperlinks on simple Slideshow.



Linear Mode