Sorry Tim, I didn't understand it that way.

You should still be able to do this fairly simply.

You don't have to specify the url, you can pass it as a variable.
But you would need to put your $.ajax function into another function,
and call it when clicked. You can also build the data variables in the
other functions.

For instance
[code]
$('form#1').submit(function(){
   var url=$('form#1).attr('action');
   // then get your data variables and do whatever you want to do with
them
    var type= "get";
    submitForm(url, data);

});

function submitForm(url, data){
$.ajax({
         type: type,
         url: url,
         data: data,
          success: function(){

}
})

}

[/code]

I hope that helps, and that I understand what you were trying to do
better than my first answer.

Reply via email to