Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use warnings;
- print "content-type: text/html \n\n";
- my $keys = %ENV;
- sub sendstuff {
- print "<html><head><script type=\"text/javascript\">
- function getkey(key) {
- if (key=='') {
- 'proj3.pl'
- {
- document.getElementById('txtHint').innerHTML='';
- return;
- }
- if (window.XMLHttpRequest) { xmlhttp=new XMLHZttpRequest(); }
- else { xmlhttp=new ActiveXObject('Microsoft.XMLHTTP') }
- xmlhttp.onreadystatechange=function() {
- if (xmlhttp.readyState==4 && xmlhttp.status==200) {
- document.getElementById('txtHint').innerHTML=xmlhttp.responseText;
- }
- }
- xmlhttp.open('GET','proj3.pl',true);
- xmlhttp.sent();
- }
- </script>";
- print "</head><body>";
- print "<div align=\"center\">Please select an ENV key<br>";
- print "<form><select name=\"env\" onchang\"showUser(this.value)\">\n";
- foreach my $key (keys %ENV) {
- print "<option value=\"$key\">$key</option>", "\n";
- }
- print "</select><input type=\"submit\" value=\"Get the Key Value\">";
- print "</form></div>";
- print "<div align =\"center\" id=\"txtHint\"></div>";
- print "</body></html>";
- }
- sendstuff;
Advertisement
Add Comment
Please, Sign In to add comment