On Tue, 20 Jun 2006 09:56:45 +0530, Srinivasa Rao wrote:
Hi
> use CGI::Session;
> use CGI qw/:standard/;
> $session = new CGI::Session();
$session = CGI::Session -> new().
This is a good habit to get in to, and the difference matters when you start
using inheritance.
> my $CGISESSID = $session->id();
> print header();
> print start_html();
> print '<form id="MainForm" method="Post" width="200px" >';
> $session->param('f_name', 'Sherzod');
> $session->param(-name=>'l_name', -value=>'Ruzmetov');
> my $f_name = $session->param('f_name');
> my $l_name = $session->param(-name=>'l_name');
> print '<input type=button value=FWD onclick="Action()">';
> print '<script language="Javascript">';
> print 'function Action()
> {
> document.forms(0).action=" s.pl?'.$session->name.'='.$CGISESSID.'"; //
> Here the Session values are getting stored as querystring
No they are not. You're using single quotes in the print statement, so
$CGISESSID is not interpolated.
> document.forms(0).submit();
> }' ;
Instead, use qq. E.g.:
print qq|function ......|;
> print '</script>';
> print end_html();
Please send all replies to the list.
--
Ron Savage
ro...@sa...
http://savage.net.au/index.html
|