cURL / Mailing Lists / curl-users / Single Mail

curl-users

Need help with curl command on a form with onsubmit confirmation

From: Jim Wang <jwang_at_tropos.com>
Date: Sat, 31 Jul 2004 15:17:51 -0700

Hi there,

I'm obviously very new to curl and have written a few curl scripts to input and execute http forms, but nothing yet that had an onsubmit. I'm just looking for the curl command that will allow me to submit the restart and also return true on the onsubmit function confirmRestart2. Simple I hope :-)

Thanks in advance,

Jim.

Here's the form:

<form method="post" action="/cgi-bin/restart.pl" onsubmit="return confirmRestart2(this)" name="form2">
<INPUT TYPE=HIDDEN NAME=restart VALUE="hsrestart"><input type="submit" name=".submit" value="System Reboot" size="125" /></form>

Here's the onsubmit function:

    function confirmRestart2()
    {
 if(confirm("Are you sure you want to continue with Hardware and Software Restart?"))
      { return true; }
        return false;
     }
Received on 2004-08-01