multiraj00 Posted May 19, 2012 Share Posted May 19, 2012 please explain me how to disable F5 button,right click and address bar in Browser like firefox and chrome(except IE)so a user can not refresh that particular page. 1 Link to comment Share on other sites More sharing options...
divinedesigns1 Posted May 19, 2012 Share Posted May 19, 2012 umm can i ask, why you want to disable F5? Link to comment Share on other sites More sharing options...
Ingolme Posted May 19, 2012 Share Posted May 19, 2012 It is pretty much "against the rules" to disable browser functions from a user. There probably is a better solution, but in order to find it we need to know why you want to disable refreshing. Link to comment Share on other sites More sharing options...
multiraj00 Posted May 19, 2012 Author Share Posted May 19, 2012 For online test so that the timer will not restart. Link to comment Share on other sites More sharing options...
Ingolme Posted May 19, 2012 Share Posted May 19, 2012 You'll need a server-side language for that. The server can keep track of the time between one submission and the next. Link to comment Share on other sites More sharing options...
multiraj00 Posted May 20, 2012 Author Share Posted May 20, 2012 i have used java script for timer and it is working.but the problem is all refreshing option is disable in only IE.when i'm using advance browser like chrome and FF thenright click and address bar is only disable not F5 button. can you give me solution of this problem in JS?? thanks in advance Link to comment Share on other sites More sharing options...
boen_robot Posted May 20, 2012 Share Posted May 20, 2012 No. There simply is no way you can completely prevent a refresh. If users want to disrupt your results by refreshing, they can always do that from some place in the browser. Even in IE - a user can always just hit "Enter" while they're at the address bar, and cause a refresh that way. JavaScript doesn't have access to any events outside the page itself, so it can't stop that.The ONLY way you can keep your timer correct is by making your server issue the initial time when the page is first opened, and keep serving that start time until the test is over. That way, refresh or no refresh, the timer will be from a common point in time. Link to comment Share on other sites More sharing options...
multiraj00 Posted May 20, 2012 Author Share Posted May 20, 2012 Dear XSLT senior, first thanks for your reply andsecond,As what i told in my previous post that it is working in IE,its working.I have tasted it.in IE i cn't refresh but in advance browser it's not working. Link to comment Share on other sites More sharing options...
boen_robot Posted May 20, 2012 Share Posted May 20, 2012 In IE, have you tried the "click on the address bar & click Enter" trick I mentioned? Does it not work even then? Can I have a link to the web page please? Link to comment Share on other sites More sharing options...
eTianbun Posted May 20, 2012 Share Posted May 20, 2012 ...As what i told in my previous post that it is working in IE,its working.I have tasted it. in IE i cn't refresh but in advance browser it's not working. Have you tried [Ctrl+R] in that same IE? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now