Thursday, July 30, 2009

How do you put a script into the html on Front Page?

I have a script for a "conveyor belt of photos" but when I pop this script into my webpage html on Front Page the actual script code shows up on my webpage. I don't know why. Thanks for your help!

How do you put a script into the html on Front Page?
You can put a %26lt;script%26gt; tag in various places in an HTML document. If you are trying to do this within the %26lt;body%26gt; tags then it would be something like this:-





%26lt;body%26gt;


%26lt;script type="text/javascript"%26gt;





--- script statements





%26lt;/script%26gt;


%26lt;/body%26gt;





You can call an external script and put it within the %26lt;body%26gt; tags like this:





%26lt;body %26gt;


%26lt;script type="text/javascript" src="CommonFunctions.js"%26gt;%26lt;/script%26gt;


%26lt;script type="text/javascript"%26gt;





-- script statements





%26lt;/script%26gt;


%26lt;/body%26gt;
Reply:Thanks! Report It

Reply:Below where you create your page, you will see three options, Normal, HTML, and Preview.





To add a script, you have to be in the "HTML" view. That displays the actual "code" of the web page. If you insert the script in "Normal" mode, it thinks it is "text" and displays it rather then "code" and runs it.


No comments:

Post a Comment