• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Trapping Refresh Buttons!!

 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!!
Any body knows how to Trap the Refresh Button.Particulary
Refresh and no Bother about Back.Pls guys I need it very Urgent.
Thankx in Advance
chandran
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Raajesh
If you are trying to stop the user from using the refresh button on the browsers screen you can't do that. Javascript is very limited in what it can and can't do to a users computer.
If you want to you can open a new browser window that doesn't have any toolbars, such a window would have no refresh button but the user would still be able to right click and pick refresh from the pop-up menu.
The only other solution I can think of would be server side, you could record a session id for the user and if you get another request for the same page it just loads a static page from memory instead of refreshing itself.
hope that helps
Dave
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi buddy,
what dave vick had written was right u can do that,and he had also mentioned that once u right click u can see the refresh in the pop up,u can disable that also easily by onmousedown event on the body tag,check for the mouse button pressed,if it is the right button i think the value is 2,depends on mouse,if it is 3 button mouse then it is 2,elz it is 1,check it out by giving alert messages and alert the event.button,u might work it out like this.
thats it.
 
Raajesh Chandran
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thankx for U'r instantaneous reply dudes..
My actual pblm is I want a new window to be opened when i close an existing window whish has all properties,I have achieved this on Unload event,but this seems to work when I click refresh as it unloads and then loads the window,so is there any way that i can achieve to open a new window only when I close the existing one not when I refresh.
Thankx!
Chandran
 
reply
    Bookmark Topic Watch Topic
  • New Topic