Javascript - Adding variable to a string of code
<p>I realized how bad I am with javascript :(</p>

<p>I have this:</p>

<pre><code>function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&amp;]+([^=&amp;]+)=([^&amp;]*)/gi,     
function(m,key,value) {
    vars[key] = value;
});
return vars;
}

var theidis = getUrlVars()["id"];
</code></pre>

<p>and</p>

<pre><code>$.tzPOST = function(action,data,callback){
$.post('php/ajax.php?id='+theidis,'&amp;action='+action,data,callback,'json');
}

$.tzGET = function(action,data,callback){
$.get('php/ajax.php?id='+theidis,'&amp;action='+action,data,callback,'json');
}
</code></pre>

<p>The first gets the ?id=value parameter properly. I tested with an alert(theidis).</p>

<p>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.</p>

<p>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.</p>

<p>Thank you in advance. :-)</p>
