source: TI03-DataExtractor/branches/old_stuff/abstractPWSC/jsFunctions.py @ 793

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/branches/old_stuff/abstractPWSC/jsFunctions.py@793
Revision 793, 881 bytes checked in by astephen, 13 years ago (diff)

Put all the old code in the old_stuff branch.

Line 
1#   Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ).
2#   This software may be distributed under the terms of the
3#   Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt
4
5"""
6jsFunctions.py
7===========
8
9Holder module for Javascript functions that will be inserted into the header
10of relevant web pages for checking purposes.
11
12"""
13
14# js_disallow - disallows the last option in a select list
15# and displays an alert.
16js_disallow="""
17<SCRIPT LANGUAGE="Javascript">
18
19function disallow() {
20    // disallow - alerts (and changes) selection if last in list
21    var radioObj=document.forms[1].option2;
22    var radioLength=radioObj.length;
23    var newValue=0;
24    if (radioObj[1].checked==true) {
25        alert("Cannot allow that selection!");
26        radioObj[1].checked=false;
27        radioObj[0].checked=true;
28    }
29}
30
31</SCRIPT>
32
33"""
34 
Note: See TracBrowser for help on using the repository browser.