Cy Think Survey

Cy Think Survey

Surveys, Polls, Questionaires, Quizzes & cetera

Survey Home
Cy Think Home
Feedback
Contact
Search Content
Pictures
Stories
Tips
Classifieds
Essays
Help Index
Cobb County GIS
Stan
Practice Tests
Student Files
YourTest
CTC
Strayer
Strayer CIS105
Programming Concepts
Altura
Bible
1 and 1
Admin

Programmer's Guide to CMS Internals #2  

JavaScript is used to set the className attribute of an object when the mouse is moved over a link. This behavior is common to all pages in the CMS, whether static or dynamic.

The findDOM.js script from Jason Crawford Teague's book on DHTML and CSS is used to provide browser independence. The setClass.js script implements the desired dynamic mouse-over behavior for links and image areas. I.e., the class name is changed back and forth between 'bright' and 'normal'

The class attributes for bright and normal are in site.css (?) The script is added to each CMS page in the gui_start_static_htm routine in JshGUI.pm.

JshBODY.pm calls gui_start_static_htm. Before doing this, JshBODY calls build_meta_group, also in JshBODY.pm.

To add JavaScript functionality to dynamically built action pages, use the code for select_key_words as a model. Start by changing the code in the appropriate Perl module. For select_key_words, this was genpage.pl. Necessary data about the selected content page is extracted from the system and put in hidden input tags. For select_key_words, there is only one hidden input tag named "words".

The command buttons are also built in this Perl script. They all execute jCmd(this) when clicked. The JavaScript examines the button label to see which button the user clicked.

Changes and additions to JshBODY.pm are also required. Based on the desired functionality, the code in this module adds the necessary script tags to the page header.

Lastly, the JavaScript is coded in a JavaScript (.js) file.

This procedure is abbreviated and high level. It is documented to prompt the programmer as to the needed steps and is not intended to be a detailed step-by-step procedures.

Copyright © 2010 Cy Think, Inc.