How To Add Java script To A Block These are the two ways to add Java script to a Nuke block Tutorial 1
This is the simplest way but it's not the most effective. Open a Nuke block and locate where you want to add the script. Close the php codes just above where the java script will be place (?>) Place the Java script in the php file then reopen the php codes at the end of the script (<?php). Your document should look like the example below. if (eregi("block-Modules.php", $_SERVER['PHP_SELF'])) { ?> Javascript here <?php ?> Tutorial 2 This tutorial is quite simple too, all you will be doing is adding slashes ( \ ) . This takes time depending on the script but basically what you will be doing is using slashes ( \ ) where quotations are in the script. Look at the example below to see how it's done. if (eregi("block-Modules.php", $_SERVER['PHP_SELF'])) { &content = " <!--Change message1 to your own--> var message1=\"Western Studios\ "; ?> Notice where the slashes are placed , here is the same code before the slashes if (eregi("block-Modules.php", $_SERVER['PHP_SELF'])) { &content = " <!--Change message1 to your own--> var message1="Western Studios"; ?>
|