jQuery AJAX from submit with variable url
===

I am trying to submit various forms on the same page via jQuery/AJAX, it is for an admin site where you edit users so the url/action for the form gets generated dynamically. e.g

`/user/limit/update?userId=7` 

or 

`/user/address/update?id=2`.

is there a way find the forms url/action, store it in a variable and pass it the the url in the ajax function?

hopefully the example will make it more obvious.

    $("#update-limit-submit").click(function() { 
            $.ajax({  
                type: "post",  
                url: "/user/limit/update?userId=7",
                data:$('#limits').serialize(),
                success: function() {
                    $("<div class='update-success'>Details updated</div>").insertAfter("#update-limit-submit");
                  }
            });
            return false; 
        }); 

Hopefully I have explained my problem correctly but please let me know if you require further info.

Thanks