Newbie needs help - modal form, buttons and the form action
Hello,
I have a modal dialog which pops up fine and I'm trying to get form data to work with a submit button. I've looked at some demos and examples but am failing to make the connection with how the html form action is referenced in jQuery? Or does jQuery require a different approach?
So, I have this page: http://www.hardingweb.net/collyers/
If you click on "Claims Online" then it opens the dialog, the grey submit button is a legacy from the current website, it has a bunch of <inputs>s, several hidden fields etc and I need to figure out to replace this functionality and move it to the jQuery "Enter" button at the bottom of the page.
I have:
- // Dialog
$('#dialog').dialog({
autoOpen: false,
width: 600,
buttons: {
"Enter": function() {
$(this).dialog("submit:").click(function(){
//Process the submit button with what?
});
//This will disable the form from going to another page
return false; ;
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
How do I link this to my HTML <form>? Any hints or examples?
Also, why does the "Cancel" button appear before (to the left of) the "Enter button"?
Thanks very much
Nigel