[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] Help with odd cgi::application error


I'm writing a "BREAD" application using perl cgi::application. I've been
going along fine, but now I'm stuck, and I can't see what's causing the
problem. Any help appreciated.

application is live at http://www.jkshirey.us/cgi-bin/ll2.cgi

problem arises trying to add an asset to the database. 

The problem is that my runmode parameter does not appear to be working
properly. If you just enter the URL
http://www.jkshirey.us/cgi-bin/ll2.cgi?rm=adda , you get the empty
subroutine output, as expected. But passing parameters from selector
subroutine, and things are all gummed up.

I've tried it a couple of ways, using start_form(action=) and hidden form
field rm, and neither works successfully. Using the hidden form field, and
my value 'adda' is being replaced by the rm value of the running subroutine,
'selecta'. Go figure. Why might this be?

This is subroutine code snippet:
	$output .= $q->start_form()."\n";
	$output .= "<strong>Enter asset's title:</strong>"
				.$q->textfield(-name => 'asset_name', -size => 60)
				."<br />\n";
	$output .= "<strong>Select asset type: </strong>"."\n";
	$output .= $q->radio_group(-name => 'tasset',
					-values => suppressed,
					-default => 'Book',
					-linebreak => '1')."<br />\n";
	$output .= $q->hidden(-name => 'rm', -value => 'adda')."\n";
	$output .= $q->submit('Continue')."\n";
	$output .= $q->end_form()."\n";


This is resulting page code:
<form method="post" action="/cgi-bin/ll2.cgi?rm=selecta"
enctype="application/x-www-form-urlencoded">

Back <br /><br />
<strong>Enter asset's title:</strong>
<input type="text" name="asset_name"  size="60" /><br />
<strong>Select asset type: </strong>
<input type="radio" name="tasset" value="Audio Book" />Audio Book<br /> 
<input type="radio" name="tasset" value="Book" checked="checked" />Book<br
/> 
...
<input type="hidden" name="rm" value="selecta"  />
<input type="submit" name="Continue" value="Continue" />
<div><input type="hidden" name=".cgifields" value="tasset"  /></div>
</form>
--
View this message in context: http://www.nabble.com/Help-with-odd-cgi%3A%3Aapplication-error-t1338224.html#a3577393
Sent from the Perl - Cgi-Application List2 forum at Nabble.com.


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.