KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a form in which the Submit button does not sit within the <form> tags. The submit button has an click handler to submit the form via jQuery's submit() event. This works perfectly. However, I need the value of the Submit button to be POST'ed as well. Since the button does not exist within the <form> tags, it is not included in the POST array. Therefore, I need to engineer a way to pass an extra variable when the form is submitted. Some stipulations on what cannot happen to achieve this include: The Submit button cannot be moved within the <form> tags. It cannot use the jQuery ajax , post , or get methods. It cannot have hidden input fields or submit buttons hidden by CSS. The form must act exactly as if there was a normal Submit button in the form. I envisioned something like, but obviously this does not work. $('#admin_form').submit({'variable_name', 'true'}); Anybody have any ideas on how I could achieve this?
Tags (comma-separated)
Save Edits
Cancel