abas
asked on
tracking mouse right click - refresh option
Hi all,
I am developing an application wherein I am having a form contains a checkbox. User will select/check the checkbox and press the submit button. This action will update the database after necessary validations.
My problem is, if I/user press right mouse click in the browser and asks to refresh the page, browser consider this as a new request and forwards the old query again. This leads to certain undesired effects in the database. Could any one of you let me know how to track the mouse right click - refresh option so that I can prevent my applications from unnecssary updates. Solutions can be in VB Script also.
Hope you understand my problem.
Thanks and regards
baskar
I am developing an application wherein I am having a form contains a checkbox. User will select/check the checkbox and press the submit button. This action will update the database after necessary validations.
My problem is, if I/user press right mouse click in the browser and asks to refresh the page, browser consider this as a new request and forwards the old query again. This leads to certain undesired effects in the database. Could any one of you let me know how to track the mouse right click - refresh option so that I can prevent my applications from unnecssary updates. Solutions can be in VB Script also.
Hope you understand my problem.
Thanks and regards
baskar
In fact, you can't do this. The only thing you can do is disable user right click only.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This question has been abandoned. I will make a recommendation to the moderators on its resolution in a week or so. I appreciate any comments that would help me to make a recommendation.
In the absence of responses, I may recommend DELETE unless it is clear to me that it has value as a PAQ. Silence = you don't care
ahosang
In the absence of responses, I may recommend DELETE unless it is clear to me that it has value as a PAQ. Silence = you don't care
ahosang
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
points to etmendz
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
ahosang
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
points to etmendz
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
ahosang
EE Cleanup Volunteer
Per recommendation, force-accepted.
Netminder
EE Admin
Netminder
EE Admin
<script language="JavaScript">
<!-- begin right_click trap
document.onmousedown=click
if (document.layers) window.captureEvents(Event
function click(e)
{
if (navigator.appName == 'Netscape')
{
if (e.which != 1)
alert("Hi! How are you?");return false;
}
if (navigator.appName == "Microsoft Internet Explorer")
{
if (event.button != 1)
alert("Hi! no right click");return false;
}
}
//-- end>
</script>
<body>
No Right click
</body>
</html>
This prevents the right click menu display, but i don't think this is the right solution for your problem, as there is an option to the user to refresh page by pressing F5(for IE) and Ctrl+R (for NN) and they can even click on Refresh/Reload button on the browser.
Good Luck...:)