Auto Build #2: YRQ Quarter YYYY (with values = YRQ, i.e. B122)
For last 3 years, with current year auto-selected.
Note: this example is using 'yrq2' since I am using 'yrq' already in the previous example. These are live examples.
[ Show Current Value ]
Auto Build #3: YRQ Quarter YYYY (with values = YRQ, i.e. B122)
For last 3 years and next year, with Summer 2011 auto-selected
Note: this example is using 'yrq3' since I am using 'yrq' already in the previous example. These are live examples.
[ Show Current Value ]
Auto Build #4: Quarter (with values = Quarter # - Quarter, i.e. 2 - Fall)
With quarter auto-selected according to value in 'lccMasterAutoSelectQuarter'
Note: These are live examples.
[ Show Current Value ]
Syntax: lccAutoFillYRQ([FLAG],[SELECT OBJECT],[GO BACK # YEARS],[# YEARS TO SHOW],[AUTO SELECT]);
[FLAG]
0 - Show as YYYY - YY, with values being YYYY-YY
1 - Show as Quarter Name YYYY, with values being YRQ
[SELECT OBJECT]
The name of the HTML - Select object Id/Name. For example, "yrq".
[GO BACK # YEARS]
How many years back the first year should start.
[# YEARS TO SHOW]
How many years to show.
[AUTO SELECT]
Which item to auto-select. Flag 0 will accept a year, how many years back and "current". Flag 1 will accept "current" only (and actually ignore this values for now).
Both of the above Auto Builds use the function:
lccAutoFillYRQ
This function utilizes code from the JavaScript library file:
waYRQEncodeDecode.js
To ulitilize, include the library file in your page (recommended in the HEAD section) and call the function. Then run the function AFTER the SELECT section of your HTML.
Example: Linking to library in HEAD section:
Inside the web page with the SELECT code, i.e. a WACI page?
<title>LCC: Washington YRQ Code Auto Builder</title>
<link rel="stylesheet" href="/css/common.css" type="text/css">
<script language="JavaScript" src="waYRQEncodeDecode.js"></script>
</head>
Example: Running the function after the SELECT section:
Inside the web page with the SELECT code, i.e. a WACI page?
Example: To set a Master Year/Quarter for any pages calling the lccAutoFillYRQ function:
Inside the library file: waYRQEncodeDecode.js
Change the values (located near the top of the library file):
var lccMasterAutoSelectYear = -1;
var lccMasterAutoSelectQuarter = -1;
To the desired values. For example, if you wanted Summer 2011 to be the Master selection on lists, do the following:
var lccMasterAutoSelectYear = 2011;
var lccMasterAutoSelectQuarter = 1;
Example: To set a Master Year/Quarter for a specific page using the lccAutoFillYRQ function for Winter 2009:
Note: since the two variables 'lccMasterAutoSelectYear' and 'lccMasterAutoSelectQuarter' are created in the library file, you do not need the 'var' part before them in this situation.
Inside the web page with the SELECT code, i.e. a WACI page?