[cgiapp] CGI::Application 4.10, Internet Explorer, Apache 2.2 : HTML Form submission issues

Mayukh Datta Roy mayukhdattaroy at gmail.com
Sat Aug 16 00:09:11 EDT 2008


Hi

 I am facing an issue with run mode defaulting on form submission. Just 
curious if someone has experienced a
similar issue and have come with any solutions or workaround.

  Problem :
     Missing CGI parameters on html form submissions
 
 Description :
  
  On pages with HTML forms, on submission of the form the 
CGI::Application defaults to the Start run mode
   instead of going to the run mode as defined in the hidden parameter "rm".
  
   What makes the problem hard to track is that it happens 
intermittently. Also this happens only with Internet Explorer.
   With Firefox it works just fine. So i can only assume this is some 
quirky IE behavior and has nothing to do with CGI::Application/Apache/Perl.
  
   In the application the only method i have defined is cgi_init() and 
setup().
   Everything else is as default.
    
  Environment
   OS : Windows XP Professional
   Web Server : Apache2.2
    Perl : ActivePerl 5.8.8
    CGI::Application : 4.10
    Internet Explorer 6.
    mod_sspi : NTML authentication

       
/*** WebApp.pm **/
##################### Initialization Methods #########################

#Set Up method
sub setup {
    my $self = shift;
    $self->tmpl_path($self->cfg('TMPL_DIR'));
}


#Initializing the variables which will be used by all the modules
sub cgiapp_init{
     my $self = shift;
   
     #Set the configuration file
     $self->cfg_file($self->param('cfg_file'));

     #database arguments
     my $dbargs = { AutoCommit => , PrintError => 1};

     #Get the database name
     my $db_name = $self->cfg('DBNAME');

     #Set the database handle
     $self->dbh_config("dbi:SQLite:$db_name","","",$dbargs);

     my $session = $self->session();

     #Check whether the user is admin
     my $admin = check_admin($self,$ENV{'REMOTE_USER'});

     #Set session parameters
     $session->param('USER',$ENV{'REMOTE_USER'});   
     $session->param('HOST',$ENV{'REMOTE_HOST'});  
     $session->param('ADMIN',$admin);
}
##########################################################
HTML Template

<TMPL_IF NAME=ADMIN>
<tr>
<td>
Select Idea Status <br>
<form action="" method=POST>
<input type="hidden" name="rm" value="set_action"/>
<input type="hidden" name="idea_id" value="<TMPL_VAR NAME=IDEA_ID>"/>
<select name="status">
<option value="NEW">New</option>
<option value="UREV">Under Review</option>
<option value="REVD">Reviewed</option>
<option value="UNIP">Under Implementation</option>
<option value="IPLD">Implemented</option>
</select>
</td>

<td align="center">
<input type="submit" value="Set Idea Status"></input>
</form>
</td>
</tr>

<tr>
<td colspan=2><hr color=blue></td>
</tr>
</TMPL_IF>


More information about the cgiapp mailing list