Re: [PHP-DB] disable right-click in all frames.
Matt -- ...and then Matt said... % % hey everyone. i have a php script that opens up a new window with multiple % frames. i am using javascript to disable the right-click mouse button on ... To answer your question, you might instead of calling the other content directly just have your script spit out the leading javascript and then passthru the actual file. Note that those of us who have javascript turned off can use the right mouse button all we want :-) It may not be worth your effort. HTH HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP-DB] disable right-click in all frames.
1. Not a PHP question. 2. Definitley not a PHP database question. 3. No, I don't think so. Matt wrote: hey everyone. i have a php script that opens up a new window with multiple frames. i am using javascript to disable the right-click mouse button on the frames. the problem is that on of the frames uses and external source, which i can't change or modifiy at all. is there a way for me to disable the right-click mouse button in that frame? is there just some way to disable the right-click in all frames (no matter what the source) on a given page? please let me know if you have any ideas. thanks. matt -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] disable right-click in all frames.
Sure there is, just fopen the remote page, get it, and then parse it until you know you're in the body tag, where you can insert your Javascript. Then just output the rest. -Micah On Sat, 2003-02-22 at 05:22, Matt wrote: hey everyone. i have a php script that opens up a new window with multiple frames. i am using javascript to disable the right-click mouse button on the frames. the problem is that on of the frames uses and external source, which i can't change or modifiy at all. is there a way for me to disable the right-click mouse button in that frame? is there just some way to disable the right-click in all frames (no matter what the source) on a given page? please let me know if you have any ideas. thanks. matt
RE: [PHP-DB] disable right-click in all frames.
I don't really know how to go about doing that. Could you go into a more in depth explanation please? Thank you. Matt -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Saturday, February 22, 2003 2:07 PM To: Matt Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] disable right-click in all frames. Sure there is, just fopen the remote page, get it, and then parse it until you know you're in the body tag, where you can insert your Javascript. Then just output the rest. -Micah On Sat, 2003-02-22 at 05:22, Matt wrote: hey everyone. i have a php script that opens up a new window with multiple frames. i am using javascript to disable the right-click mouse button on the frames. the problem is that on of the frames uses and external source, which i can't change or modifiy at all. is there a way for me to disable the right-click mouse button in that frame? is there just some way to disable the right-click in all frames (no matter what the source) on a given page? please let me know if you have any ideas. thanks. matt
RE: [PHP-DB] disable right-click in all frames.
Sure, uhm.. say your java script belongs in the body tag so that it's run when the page loads. example.com/included.html is the page you want to include in your site with the javascript. the file() function would probably work better than fopen, so I'll use that: So: ?php $javascript = onLoad='something blah blah; // This is your javascript to insert. $page = file (http://www.example.com/included.html;); // This is the page you wish to display with your javascript. foreach ($page as $line) { // Go through the file line by line. if (stristr($line, body)) { // if the line contains the body tag $pos = strpos(strtolower($line), body); // Get the position within the line $first_half = substr($line, 0, $pos+6); // split the line into two parts right after body $second_half = substr($line,$pos, strlen($line)-($pos+6)) echo $first_half . $javascript . . $second_half ; // echo the line with your javascript inserted. } else { // if the line doesn't contain body just echo it. echo $line; } ? That's the idea anyway. I didn't test this, but I'm guessing it's pretty close. I know stristr() may not be the best routine to use, and there's a couple places I'm seeing already where you could optimize things, but you get the idea. Anyone have a better way to do that? -Micah On Sat, 2003-02-22 at 11:54, Matt Palermo wrote: I dont really know how to go about doing that. Could you go into a more in depth explanation please? Thank you. Matt -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Saturday, February 22, 2003 2:07 PM To: Matt Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] disable right-click in all frames. Sure there is, just fopen the remote page, get it, and then parse it until you know you're in the body tag, where you can insert your Javascript. Then just output the rest. -Micah On Sat, 2003-02-22 at 05:22, Matt wrote: hey everyone. i have a php script that opens up a new window with multiple frames. i am using javascript to disable the right-click mouse button on the frames. the problem is that on of the frames uses and external source, which i can't change or modifiy at all. is there a way for me to disable the right-click mouse button in that frame? is there just some way to disable the right-click in all frames (no matter what the source) on a given page? please let me know if you have any ideas. thanks. matt