Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved Perl version drop-down menu to external JavaScript file
- Loading branch information
Showing
7 changed files
with
873 additions
and
1,116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,21 @@ | |||
// perlversion.js - writes Perl version drop-down menu | |||
|
|||
function selectPerlVersion(element) { | |||
if (element.value.substring(0,1) == '/') { | |||
location.href = element.value; | |||
} | |||
} | |||
|
|||
document.write('<select id="perl_version_select" name="version-chooser" onChange="selectPerlVersion(this)">'); | |||
document.write(' <option selected>Select...'); | |||
document.write(' <optgroup label="Perl 5 version 12">'); | |||
document.write(' <option value="/index.html">Perl 5.12.0'); | |||
document.write(' </optgroup>'); | |||
document.write(' <optgroup label="Perl 5 version 10">'); | |||
document.write(' <option value="/5.10.0/index.html">Perl 5.10.0'); | |||
document.write(' </optgroup>'); | |||
document.write(' <optgroup label="Perl 5 version 8">'); | |||
document.write(' <option value="/5.8.9/index.html">Perl 5.8.9'); | |||
document.write(' <option value="/5.8.8/index.html">Perl 5.8.8'); | |||
document.write(' </optgroup>'); | |||
document.write('</select>'); |
Oops, something went wrong.