Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: CGI::Application and start_multipart_form stumper

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


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
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2025-07-07 22:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.