Tips on Copying JavaScript
The previous section showed you the HTML code and you could see the locations of the different scripts in the different sections of a web page. Now, how do you make the web page actually show you the code?
Suppose you have found a web page that has some very interesting and potentially useful special effects that you might want to attempt to encorporate into some of your pages. We first need to find a view of the HtML code so you can see the script to copy.
Page Containing a special effect View + SourceLooking at the Menubar of the web page containing the special effect, you simple click on View + Source. This should launch the application set on your compter to display the HTML coding. Typically this application is Notepad. You should be able to see the content of the web page at its HTML coding level.
Once you are viewing the code, look for the <HEAD> and <BODY> tags. Try to determine where the script might be found on the Notepad view (or whatever application is displaying the page code). Before you attempt to copy anything, you should determine in your mind where the script starts and ends. (You don't want to copy part of the script and not get it all.)
When you have the targeted script you want to copy in mind, select the entire section you want to copy by the familar "click and drag" method. Then copy using CTRL+C or select Edit + Copy from the Menubar.
You are ready to move the code from the working page to the page where you want to use the special effect. You simply add to your web page the appropriate code from the working page and past it in the correct location.
Working Page Copy/Paste Your PageScript in the Head section --------->Between the Head tags Script in the Body section --------->Between the Body tags Script in the Body tag --------->Inside the Body tag If things are working correctly (and the 'computer gods' are smiling), you should see the special effect that was working before now working on your page. That's it! You have successfully copied/pasted the special effect to your page.
Now we will look at some tips for modification of the script to make it fit your needs.
More Tips on Modifying a Special Effect Script | View the Collection