Vikas Jayna Posted December 28, 2006 Share Posted December 28, 2006 I have a page on my site wherein by clicking a particular link, it opens a popup. Now, the issue is there are some users who have the habit of right clicking the links and opening them in a new window or a new tab. Whenever such a thing happens, the user gets the content of the parent page and not the popup. Is there something that can be done to solve this? Quote Link to comment Share on other sites More sharing options...
Pezmc Posted December 29, 2006 Share Posted December 29, 2006 You could disable right clicking, Whack this in[code]<SCRIPT TYPE="text/javascript"><!--//Disable right click script//visit http://www.rainbow.arch.scriptmania.com/scripts/var message="Sorry, right-click has been disabled";///////////////////////////////////function clickIE() {if (document.all) {(message);return false;}}function clickNS(e) {if(document.layers||(document.getElementById&&!document.all)) {if (e.which==2||e.which==3) {(message);return false;}}}if (document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}document.oncontextmenu=new Function("return false")// --></SCRIPT> [/code] Quote Link to comment Share on other sites More sharing options...
Vikas Jayna Posted December 30, 2006 Author Share Posted December 30, 2006 Got it! Its just a question of making the href and the window.open url same and then if somebody opens the link through right click, it opens the correct page in 100% window size Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.