document.foo.submit();

Yeah, that much I'm familiar with; I've personally seen examples of sites that use scripts to submit forms. This is no problem for scripting, because instead of executing the script you just submit the form. Sometimes the script does some other things before it submits the form, such as changes some field values. In that case, you just do that first, then submit the form.

However, it can be extended by creating a class of functions to submit multiple forms at the same time.

That's what I haven't seen and wouldn't know how to do. (How do you stop your script from ceasing to execute when the first form is submitted? Or is Javascript multithreaded these days? Where do the extra result pages go, then? Do they pop up in extra windows, or what?) Anyway, that's some pretty weird stuff, submitting multiple forms at once. Sites ought not to do such things. Sometimes I wish LiveScript had never been developed.


$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

In reply to Re: LWP multi-form POST by jonadab
in thread LWP multi-form POST by jagb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.