I have a form in which the Submit button does not sit within the tags. The submit button has an
click
handler to submit the form via jQuer
One thing you could do is use the onsubmit
attribute to have javascript inject a post field into the form with the value of the submit button right as it is submitted. You'd have to do this with a hidden input field, but you'd only add the input field right after the user clicked the submit button -- so the input field wouldn't exist there from the beginning (hopefully this satisfies your requirements). So something like:
function submitHandler()
{
submitVal = $('#submitButton').val();
$('#myForm').append("");
return true;
}
Which would stick in the extra value right as the button was clicked.