New from a newbie!
This code is really Java Script, but it has saved me a few keystrokes. On my desktop I run Apache Webserver as bundled with Indigo Perl 5.6. Apache has a start page that
begs you to do something a little more intersting with it. The cgi-bin directory isn't browsable, so I added this small bit to the welcome screen to jump straight to a script in the cgi-bin directory:
<script language=JavaScript1.2>
function openScript () {
var targetURL=document.form1.file1.value;
targetURL=targetURL.substring(targetURL.lastIndexOf('\\')+1,
targetURL.length);
alert (targetURL);
document.location.href='http://localhost:4444/cgi-bin/'+targetURL;
}
</script>
There are a few things you could do to make this not necessary at all. You could enable directory browsing with a .htaccess file, but on a Window$ machine you aren't allowed to have files without a name (e.i., files with only an extension, like .htaccess, are not allowed on a Window$ machine). You could configure Apache to look for directory level commands somewhere other than a .htaccess file, but that's just too deep for a newbie like me ;)
And this could be tweaked with more inputs incase you wanted to actually pass something to a script. But for now I'm not advanced enough to write scripts that
need anything passed to them. Maybe when I finish
Ovid's intro to CGI course.....
Petras
perl=>firmware;
#Then I'd be a Chip Monk.