Jump to content

help me include this javascript to php


jkost

Recommended Posts

Hi

 

i would like to try this and see how it behaves..but maybe i'm doing something

wrong and it's not working.

 

<?php
echo '<SCRIPT LANGUAGE="JavaScript"><!--';
echo 'var message = 'Sorry, image saving not allowed.' ;';
echo 'function clickie() {';
echo '  if (document.all) { ';
echo ' alert(message);'; 
echo 'return false; } }';
echo 'function clickns(e) {'; 
echo 'if (document.layers||(document.getElementById&&!document.all)) {';
echo 'if (e.which==2 || e.which==3) {';
echo 'alert(message);';
echo 'return false; } } }';
echo 'if (document.layers) {';
echo 'document.captureEvents(Event.MOUSEDOWN);'; 
echo 'document.onmousedown=clickns; ';
echo '} else {'; 
echo 'document.onmouseup=clickns;'; 
echo 'document.oncontextmenu=clickie;';
echo '}'; 
echo '// -->';
echo '</SCRIPT>';';  
?>

Link to comment
https://forums.phpfreaks.com/topic/192707-help-me-include-this-javascript-to-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.