Javascript and Postback

  • Thread starter Thread starter eesp.test
  • Start date Start date
E

eesp.test

Hi everyone,

Is there an easy way to reset a javascript timer whenever there is a
postback? Right now I have it set up to reset during the onload event
but I would also like it to reset during a post back. The purpose is to
send a message to the user after 30minutes of inactivity saying that
their session has ended and redirect to another page.

Kind of thought this fit under asp.net more than javascript.

Thanks for the help!
 
Right now I have it set up to reset during the onload event
but I would also like it to reset during a post back. The purpose is to
send a message to the user after 30minutes of inactivity saying that
their session has ended and redirect to another page.

what do you mean? postback will trigger onload when page comes back.
and your regular logic should just work
 
Hi everyone,

Is there an easy way to reset a javascript timer whenever there is a
postback? Right now I have it set up to reset during the onload event
but I would also like it to reset during a post back. The purpose is to
send a message to the user after 30minutes of inactivity saying that
their session has ended and redirect to another page.

Kind of thought this fit under asp.net more than javascript.

Thanks for the help!


Why dont you use the 'session_onend' within global.asax instead of
timers ??? You can display another page (with a message) from
there....and then redirect elsewhere...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top