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? Link to comment https://forums.phpfreaks.com/topic/32039-solved-opening-popup-through-right-click-opens-the-same-window/ 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] Link to comment https://forums.phpfreaks.com/topic/32039-solved-opening-popup-through-right-click-opens-the-same-window/#findComment-149061 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 Link to comment https://forums.phpfreaks.com/topic/32039-solved-opening-popup-through-right-click-opens-the-same-window/#findComment-149805 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.