Try setting form.action and using form.submit() to send it ('edit.php' is
not valid javascript).


    function submitTo(form, url) {
        form.action = url;
    <form name="f" action="submit.php">
        <input type="submit"
            value="Submit Request"
            onclick="submitTo(document.f, 'submit.php')"
        <input type="submit"
            value="Edit Request"
            onclick="submitTo(document.f, 'edit.php')"

Note that this includes a fall-back: if JavaScript is not supported, the
form will be submitted by either button.

"Jennifer Arcino Demeterio" <[EMAIL PROTECTED]> wrote in message
000a01c1092d$0c3baba0$[EMAIL PROTECTED]">news:000a01c1092d$0c3baba0$[EMAIL PROTECTED]...
> hello,
> hope anyone has an idea on how to fix this...
> <form>
> <input type="submit" name="Submit" value="Submit Request"
> OnClick="submit.php" class="button">
> <input type="submit" name="Edit" value="Edit Request" OnClick="edit.php"
> class="button">
> </form>
> even i click on the edit button, it will still go to submit.php page, why
> that?
> thanks

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to