I am using JS to open a new window that contains a lager view of an image.
How can the "no right click" script be applied to the new window?
Thanks,
mm
I am using JS to open a new window that contains a lager view of an image.
How can the "no right click" script be applied to the new window?
Thanks,
mm
Please link to the script in question.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
http://www.dynamicdrive.com/dynamicindex9/noright3.htm
I am using JS to open a new window that contains a lager view of an image.
How can the "no right click" script be applied to the new window that opens?
The "NO RIGHT CLICK" script works fine on the ORIGINAL page (window), but when the new window is opened, the right click function is NOT disabled.
Thanks,
mm
Try:
It might not work, though. In all honesty, I've quite a bit still to learn about reflection and such in Javascript.Code:var oldWinOpen = window.open; window.open = function(n) { win = oldWinOpen(n); if (document.layers) {win.document.captureEvents(Event.MOUSEDOWN);win.document.onmousedown=clickNS;} else{win.document.onmouseup=clickNS;win.document.oncontextmenu=clickIE;} win.document.oncontextmenu=new Function("return false"); return win; }
Last edited by Twey; 08-10-2005 at 08:31 AM.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
This post may be helpful too.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks