Title: Re: PERL CGI: 2 POST methods using same parameters

Hi,

you may need to use _javascript_ here...

e.g. html segment:

<form id="yourform" name="yourform" method="post">
        <!-- some form elements go here -->
        <!-- some form elements go here -->
        <!-- some form elements go here -->
        <!-- some form elements go here -->
        <input
                value="post to action_1.cgi"
                type="submit"
                >
                >
        />
        <input
                value="post to action_2.cgi"
                type="submit"
                >
                >
        />
</form>

you may need some _javascript_ like this (put them in <head> part):

<script type="text/_javascript_">
<!--

function action(frm,url) {
        frm.action = ""         // this is the meat
}

//-->
</script>

onclick event & onkeypress event drive to set up the targeted cgi url.

Regards,
Calvin



    -----Original Message-----
    From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] On Behalf Of Ariadna Font Llitjos
    Sent:   Thursday, January 22, 2004 8:07 AM
    To:     [EMAIL PROTECTED]
    Cc:     [EMAIL PROTECTED]
    Subject:        PERL CGI: 2 POST methods using same parameters


    Hi,

    I'm trying to create an html page (with a cgi script) which after allowing
    the user to pick among a few choices (by checking on the appropriate
    check-box), it asks the user to pick between two actions, namely two
    different POST methods which take them to different cgi scripts, but which
    need to have access to the same set of values.

    The problem I am having right now is that if the user picks the second
    action by clicking on the second submit button, the values only get stored
    in the first form (ie. when clicking on the first button), and I don't seem
    to have access to them from the second form.

    Is there a way to share the values between two html forms containing POST
    methods pointing to different cgi scripts?
    If not, what would be the best way to share user choices between to scripts
    that can be called from the same html page?

    thanks,

    Ariadna Font Llitjos
    [EMAIL PROTECTED]

Reply via email to