ESU 10 Home > Network and Information Services > nis.esu10.org/teachers November 22, 2008

Using Javascript

We have found that using javascript on a manila site can be challenging. If you would like to use javascript, we have found that it is easiest to have a self-contained javascript that can be put in a gem. This would mean that all of the javascript code would normally be put right in the content area of your pages. Unfortunately, javascript contains {braces} and Manila will convert them to the ascii code to display on the page rather than running the script.

To prepare to use javascript, you will need to make the <script> tag available within your site. To do this, click "Prefs" and then "Legal Tags". Put a check next to the <script> tag and submit the form.

Next you will need to upload the javascript code as a gem. Once you have the gem uploaded, copy and paste the URL to the gem.

Now we need to insert the gem into the page. To do this, we use the {includeHTTP ()} macro. On your page, you want to type the following:

{includeHTTP ("http://manila.esu10.org:8000/gems/manilaSupport/scrolling.js")}

Remeber to use the URL of your gem in place of the example.

Notice the results on the bottom of the window.

Here is a link to the example gem if you would like to use it: "Scrolling Javascript"

Here is more information from Userland.


Copyright © 2008 manilaSupport
webmaster@esu10.org

Last updated on Wednesday, April 23, 2003 at 2:49:51 PM

Print This Story | Mail This Story

Login