I have used this script to set an order.
<script type="text/javascript">
$( "#post_list" ).sortable({
placeholder : "ui-state-highlight",
update : function(event, ui)
{
var post_order_ids = new Array();
$('#post_list li').each(function(){
post_order_ids.push($(this).data("post-id"));
});
$.ajax({
url:"ajax_upload.php",
method:"POST",
data:{post_order_ids:post_order_ids ,var_i_want:<?php print $var_i_used;?>},
success:function(data)
{
if(data){
$(".alert-danger").hide();
$(".alert-success ").show();
}else{
$(".alert-success").hide();
$(".alert-danger").show();
}
}
});
}
});
</script>
Now i would like to add a $var (set in php) to be send with it to ajax_upload.php I am not familiar with javascript. Is this possible?
EDIT: Got it line is updated how it works. Thnx.