| | |
embed javascript in php
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2007
Posts: 1
Reputation:
Solved Threads: 0
Hello all,
I'd like to embed a javascript code into this part of the php/html
I'd like to add this javascript to it:
My problem is that when I add this myself, a blank page will open but I'm still able to rightclick my mouse.
Can anyone give me an example how to correct this?
Thanks.
I'd like to embed a javascript code into this part of the php/html
PHP Syntax (Toggle Plain Text)
?> <a href="<?=$images[$k][0]?>" target="blank"> <img src="<?=$thumbdir."/".$images[$k][0]?>" border="0"><br /> <?=$images[$k][0]?> </a><br /> <?=round($images[$k][2]/1024)?>Kb, <?=date("d-m-y",$images[$k][1])?> <?
I'd like to add this javascript to it:
PHP Syntax (Toggle Plain Text)
<script language=JavaScript> <!-- //Disable right mouse click Script //By Maximus (<a href="mailto:maximus@nsimail.com">maximus@nsimail.com</a>) w/ mods by DynamicDrive //For full source code, visit <a rel="nofollow" class="t" href="http://www.dynamicdrive.com" target="_blank">http://www.dynamicdrive.com</a> var message="Function Disabled!"; /////////////////////////////////// function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("alert(message);return false") // --> </script>
My problem is that when I add this myself, a blank page will open but I'm still able to rightclick my mouse.
Can anyone give me an example how to correct this?
Thanks.
Last edited by stymiee; Feb 18th, 2007 at 11:17 am. Reason: added code tags
![]() |
Similar Threads
- embedding java script in php (PHP)
- how to access accessing PHP variable in JavaScript (PHP)
- Help -regarding Loading Labels In Html From Xml Using Javascript Or Php (JavaScript / DHTML / AJAX)
- how to extract data from javascript into php (PHP)
- how to change the the value of src in <embed> using javascript (JavaScript / DHTML / AJAX)
- merge javascript with php... (PHP)
- PHP with Javascript Parsing (PHP)
Other Threads in the PHP Forum
- Previous Thread: problem with session_start
- Next Thread: Problems with PHP and the mysql_connect() command.
| Thread Tools | Search this Thread |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube





