jQuery ajax post dynamic url insertion
- by Kirill
$.ajax({ type: "POST", url: "OMFG.php", data: info, success: function(){ }});
is what I'm using atm as a test and it works fine.
I need to get the url from the link I'm clicking, so I do:
var url = $(this).attr("href");
which works fine if I alert it out(the link includes http://samedomain.com/etc.php), but the ajax function doesn't post if I insert it into the ajax code:
$.ajax({ type: "POST", url: url, data: info, success: function(){ }});
Please help, as I'm screwed without this working.