#!/usr/bin/perl #Hash Array containg list of pages to display depending on test results. %resultURLs = ( 'PASS', 'http://www.mscorp.org/cgi-bin/invo.pl', 'FAIL', 'http://www.mscorp.org/js/invorder.pl/nojs.html' ); #URL of this script. $scriptURL = "/cgi-bin/invorder_djs.pl"; #Read hidden form results and decide what to do. require "lib/cgi-lib.pl"; #You can use CGI.pm if you like. &ReadParse; if (!$in{'jstest'}){ &runJSTest; } else{ $result = uc $in{'jstest'}; $url = $resultURLs{$result}; print "Location: $url\n\n"; exit; } #Print HTML output that handles the testing. sub runJSTest{ print < CHECKING YOUR SYSTEM FOR INSTALLED COMPONENTS... #Redirect to error page if JavaScript found within 5 seconds.

PLEASE WAIT

CHECKING YOUR SYSTEM FOR INSTALLED COMPONENTS

IF THIS PAGE DOES NOT CHANGE WITHIN 10 SECONDS, PLEASE CLICK HERE.

#Hidden form that returns the results, if JavaScript is enabled.
END_OF_HTML exit; }