K
Karuna
Hi
am quite new to Javascript and CGI related stuff.
I have following javascript code :
-----------------------------------------------
<html>
<head>
<script language="JavaScript">
</script>
</head>
<H1> Test Tool </H1>
<HR>
<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">three
<option value="four">four
</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:ath;
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_tempfiles :standard);");
(print("Error: $@"), exit(-1)) if $@;
# Create CGI object.
$cgi_form = new CGI;
# Read form values and save
#$f_platform = $cgi_form->param('platform');
$f_hpux_install = $cgi_form->param('hpux_ins');
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="JavaScript">
</script>
</head>
<H1> Test Tool </H1>
<HR>
<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">three
<option value="four">four
</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:ath;
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_tempfiles :standard);");
(print("Error: $@"), exit(-1)) if $@;
# Create CGI object.
$cgi_form = new CGI;
# Read form values and save
#$f_platform = $cgi_form->param('platform');
$f_hpux_install = $cgi_form->param('hpux_ins');
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.