When using $.POST and $.GET in jquery is there any way to add custom vars to the URL and send them too? i tried the following :
$.ajax({type:"POST", url:"file.php?CustomVar=data", data:$("#form").serialize()});
And :
<input name="CustomVar" type="hidden" value="data" />
$.ajax({type:"POST", url:"file.php", data:$("#form").serialize()});
The first ones problem is that it send the custom as get but i want to receive it as post. The second one well i'm using it right now but there is not any better way?