Here's what I would do: After they log-in I would grab the page with the checkboxes and hidden fields on it from the remote server. Parse it and get the checkboxes and number fields out (I'd use HTML::TokeParser for that) so they would have checkboxes like the would normally had they actually logged into the remote server.

Theoretically if there are no cookies involved you could simply cause the form to post back to their server (though they would be taken there). If you want them to remain on your site you can use LWP to post the info yourself and send the user back to your own success page (or error page if the Post request to the remote server fails)

All of that is the *best way* as it doesn't require your user to know the numbers. However if you don't want to go to all that trouble and you want the user to enter the numbers the simplest way to add the hidden field would be to use javascript (no one shoot me for putting some JS code here :)). Go ahead and create a hidden field with the correct name but leave its value blank and then do this: (untested!)

<form method="POST" action="somescript.cgi" onSubmit="addHiddenFields( +this)">
And then in your script section:
function addHiddenFields(myform) { myform.delCode1.value = myform.delCheck1.value; }

If you have more than one you can just add them or use arrays and loops to add them dynamically. JS is really quite simple.

Lobster Aliens Are attacking the world!

In reply to Re: Re: Re: Converting Javascript to Perl by cfreak
in thread Converting Javascript to Perl by sulfericacid

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.