Specifications

About JavaScript
JavaScript is a lightweight, object-oriented, cross-platform scripting language.
Wiki server pages include the prototype.js and script.aculo.us frameworks, which
enhance and streamline the use of JavaScript.
For more information, see the following:
Topic URL
JavaScript developer.mozilla.org/en/docs/JavaScript
quirksmode.org/js/contents.html
crockford.com/javascript/javascript.html
prototype.js prototypejs.org/api
script.aculo.us wiki.script.aculo.us
Here are some published JavaScript guides:
 JavaScript: The Denitive Guide, 5th Edition, by David Flanagan. O’Reilly Media, Inc.
2006.
 Beginning JavaScript with DOM Scripting and Ajax: From Novice to Professional, by
Christian Heilmann. Apress. 2006.
JavaScript Example
The following example JavaScript function adds a header link next to the magnier
button that points to www.apple.com and changes the “Other Wikis” link to point to
www.apple.com:
Event.observe(window, 'load', function() {
// add another header link (to apple.com) by manipulating the DOM
// using script.aculo.us Builder
// we'll just insert it before the search button
if ($('linkSearch')) {
$('linkSearch').parentNode.insertBefore(Builder.node('li',
{id:'linkApple'}, [
Builder.node('a', {href:'http://www.apple.com'}, 'apple')
]), $('linkSearch'));
}
// change the Other Wikis link to something else
if ($('groups_users_button')) {
$('groups_users_button').down('a').href = 'http://www.apple.
com/';
}
});
48 Chapter 3 Customizing How the Wiki Looks