Hi dear friends
I have a cgi page written by perl my code is :

#!/usr/bin/perl -w use CGI; use warnings; $query = new CGI; print $query->header(); print $query->startform(action=>$site); print "<TABLE CELLPADING=0 BORDER=0 ><TR>"; print "<TH>cool1</TH><TH >col2 Site</TH><TH col3</TH><TH>col4</TH><TH +>col5</TH></TR>"; print "<TH>",$query->popup_menu('SRC_ADDR',['ADD1','ADD2'],default=>' +ADD1'),"</TH>"; # some other perl code # Now i want to change the action of form # if SRC_ADDR=ADD1 action of form should change to http://192.168.100 +.10/cgi/bin/addr1.cgi # if SRC_ADDR=ADD2 action of form should change to http://192.168.100 +.11/cgi/bin/addr2.cgi #Other perl code $temp=$temp+1; print "</TABLE>\n</DIV>\n"; print "<P>",$query->submit(); print $query->endform; print "<HR>\n";

How can i change the action of my form during the program thanks for your help

20040316 Edit by Corion: Added formatting, code tags


In reply to changing form action by ralijani

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.