I realized how bad I am with javascript :(
I have this:
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,
function(m,key,value) {
vars[key] = value;
});
return vars;
}
var theidis = getUrlVars()["id"];
and
$.tzPOST = function(action,data,callback){
$.post('php/ajax.php?id='+theidis,'&action='+action,data,callback,'json');
}
$.tzGET = function(action,data,callback){
$.get('php/ajax.php?id='+theidis,'&action='+action,data,callback,'json');
}
The first gets the ?id=value parameter properly. I tested with an alert(theidis).
I am looking to do a simple thing - sorry if this is stupid -.- I have worked as this for so long that I am beginning to oversee things.
I want an ?id=value to be added to the php/ajax.php. I tried with the above, but it doesn't seem to work. I also tried by just adding it.
Thank you in advance. :-)