i think that you only want to use POST method when (a) you don't want the browser user to see the parameters in the url (b) you're sending a fair amount of data with the url, i.e. more than url length allows.
btw you can get around the parameter issue (a) by using an iframe.
anyway...what i'm getting to is that you can simply append your parameters to the url, for the next cgi script to pick up as per usual via param method. e.g.
$next_url = "http://blabla.com/cgi/script.cgi?";
$next_url .= "city=" . $city if($city);
...
$next_url =~ s/\?$//; # remove question mark if no parameters added
+to next_url
funny thing that you're trying to move away from javascript though...as a decent ajax form can check all fields, provide feedback, and post the data, all without a reload...and form reloads are continuity disruptive and a general pain for users to use.
generally people are moving to ajax rather than away from it...as it has markedly improved the user experience
the hardest line to type correctly is: stty erase ^H
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.