Hi
am quite new to Javascript and CGI related stuff.
I have following javascript code :
-----------------------------------------------
<html>
<head>
<script language="JavaS cript">
</script>
</head>
<H1> Test Tool </H1>
<HR>
<BODY>
<form method ="POST" name="form" action="/usr/local/apache/cgi-bin/test.cgi"[color=blue]
>[/color]
<br>
<b> HPUX Machine List
</br>
</br>
</br>
Select Machine Name:
<select name="hpux_list " size=1>
<option value="one">one
<option value="two">two
<option value="three">t hree
<option value="four">fo ur
</select>
Install Patch
<Input type="radio" name="hpux_ins" value="Install" >
Remove Patch
<Input type="radio" name="hpux_ins" value="Remove">
<input type="submit" value="Go">
</form>
</body>
</html>
-------------------------------------------------------
and following Perl CGI code :
#!/usr/bin/perl -w
#
use strict;
use File::Path;
use File::Copy;
use Time::localtime ;
use CGI;
use vars qw($cgi_form $f_hpux_install );
#Autoflush.
$| = 1;
# Make sure CGI version 2.46 or above is installed.
eval("use CGI 2.46 qw(-private_tempfil es :standard);");
(print("Error: $@"), exit(-1)) if $@;
# Create CGI object.
$cgi_form = new CGI;
# Read form values and save
#$f_platform = $cgi_form->param('platfor m');
$f_hpux_install = $cgi_form->param('hpux_in s');
open (TEM, ">temk");
print TEM "the value is $f_hpux_install \n";
close (TEM);
----------------------------------------------
Upon the submission of form with above javascript file
the CGI code should create a file called temk but its not
doing so ?.
Can someone kindly put a light on this as why its not doing so ?.
Its bit urgent !
Thanks in advance
Kbs.
am quite new to Javascript and CGI related stuff.
I have following javascript code :
-----------------------------------------------
<html>
<head>
<script language="JavaS cript">
</script>
</head>
<H1> Test Tool </H1>
<HR>
<BODY>
<form method ="POST" name="form" action="/usr/local/apache/cgi-bin/test.cgi"[color=blue]
>[/color]
<br>
<b> HPUX Machine List
</br>
</br>
</br>
Select Machine Name:
<select name="hpux_list " size=1>
<option value="one">one
<option value="two">two
<option value="three">t hree
<option value="four">fo ur
</select>
Install Patch
<Input type="radio" name="hpux_ins" value="Install" >
Remove Patch
<Input type="radio" name="hpux_ins" value="Remove">
<input type="submit" value="Go">
</form>
</body>
</html>
-------------------------------------------------------
and following Perl CGI code :
#!/usr/bin/perl -w
#
use strict;
use File::Path;
use File::Copy;
use Time::localtime ;
use CGI;
use vars qw($cgi_form $f_hpux_install );
#Autoflush.
$| = 1;
# Make sure CGI version 2.46 or above is installed.
eval("use CGI 2.46 qw(-private_tempfil es :standard);");
(print("Error: $@"), exit(-1)) if $@;
# Create CGI object.
$cgi_form = new CGI;
# Read form values and save
#$f_platform = $cgi_form->param('platfor m');
$f_hpux_install = $cgi_form->param('hpux_in s');
open (TEM, ">temk");
print TEM "the value is $f_hpux_install \n";
close (TEM);
----------------------------------------------
Upon the submission of form with above javascript file
the CGI code should create a file called temk but its not
doing so ?.
Can someone kindly put a light on this as why its not doing so ?.
Its bit urgent !
Thanks in advance
Kbs.
Comment