This seems that this should be so simple but it's not working. What I'm doing is getting the old action, adding an ID to the end, and setting the form action to that. Here's the code:
var action = $('#update-schedule-form').attr('action');
$('#update-schedule-form').attr('action', action + '/1');
I can see that the form's action gets changed in FireBug and in Chrome's inspector. However, when I click the submit button, it still sends it to the original action. For example, it shows "/controller/action/1" in code but submits to "/controller/action". Any ideas what is going on here?
UPDATE
It turns out that the framework I'm using, Yii, stores the original form action address for it's ajax validation routines. I wasn't seeing the form submit in Firebug, I was seeing the validation trying to validate the form before submission. I have no idea where Yii stores the URL it uses or how to change it (should be using the form action, but apparently it's not), so I just modified my controller and made the ID parameter optional. Now the validation runs happily and the form submits correctly.