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

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.

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

This article has been dead for over six months. Start a new discussion instead.