Beefy Boxes and Bandwidth Generously Provided by pair Networks BBQ
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: CGI::Application and start_multipart_form stumper

by Belgarion (Chaplain)
on Dec 06, 2005 at 00:13 UTC ( [id://514323]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to CGI::Application and start_multipart_form stumper

In list(), I tested just the form generation code and it doesn't look like it's producing valid HTML.

The code I used was:

#!/usr/bin/perl use strict; use warnings; use CGI; my $q = CGI->new(); my $output = $q->b("Field1: ") . $q->textfield(-name=>'field1',-size=> +20) . $q->p() . $q->b("MP3:") . $q->filefield(-name=>'mymp3', -size=>20) . $q->p() . $q->b("Field2:") . $q->textarea(-name=>'field2',-rows=>4,-cols=>20 +); $output = $q->start_multipart_form() . $q->hidden(-name=>'rm',-value=>'save_mode') . $output . $q->br() . $q->submit(-label=>'Upload') . $q->end_form(); print $output; exit; __DATA__ <form method="post" action="/./html.pl" enctype="multipart/form-data"> <input type="hidden" name="rm" value="save_mode" /><b>Field1: </b><in +put type="text" name="field1" tabindex="1" size="20" /><p /><b>MP3:< +/b><input type="file" name="mymp3" tabindex="2" size="20" /><p /><b> +Field2:</b><textarea name="field2" tabindex="3" rows="4" cols="20"></ +textarea><br /><input type="submit" tabindex="4" name=".submit" value +="Upload" /><div></div> </form>

As you can see, there is no closing form tag. (Also, some of the fields are in XHTML rather than HTML, so that could be causing problems as well.) I don't have a full answer at the moment, but Firefox 1.5 might be more strict about valid HTML.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://514323]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.