• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

setTimeOut not working with JS alerts

 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am using setTimeout in my jsp to ping the server repeatedly after some time . The ping should reach the server from the client just to check that the user has kept his browser open

But the strange thing is that when there is an alert in the page say "Are you sure you want to delete ?" comes up in the page with OK and CANCEL buttons . If the user doesn't click any of them setTimeout() is not working . I mean call is not happening from the client to server

is this the limitation of that function ?? i can't use meta tag as i doesn't want my page to be refreshed .

Can any one let me know how to go about this ??
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the confirm stops the execution of anything on the page. It is like a pause button.

Eric
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any other way of doing this ....by doing some chages in the meta tag atleast
 
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could always try replacing the alert with a custom popup window or floating div.

-Yuriy
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi yuriv

I agree that alerts can be replaced with div but my application already has lots of validations which prompt the JS alerts and at this moment its tough to replace them

Ok i have an idea of using meta tag and refreshing the page by having some hidden frame(May be iframe) in that page

Will the meta tag also stop functioning with the alerts on the page ??
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The meta tag should stop working too.

Eric
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic