Claro que estoy leyendo, pero te explicare lo que estoy haciendo..
tengo este pequeño codigo
Código PHP:
<?php
require_once("common/head.php");
include('php/conex.php');
$id = $_GET['id'];
$target = $_GET['target'];
$query = mysql_query("SELECT source,target,title,message from message where source = '$target' and target = '$id' or source='$id' and target ='$target' ORDER BY id asc");
?>
estoy haciendo una aplicacion en Jquery Mobile y necesito de ese valor, como ya sabras no puedo imprimir el valor que trae el var_dump mas que solo mediante un alert();
Código:
<script type="text/JavaScript">
<!--
$(window).load(function() {
$("html, body").animate({ scrollTop: $(document).height() }, 1000);
});
function timedRefresh(timeoutPeriod)
{
setTimeout("location.reload(true);",timeoutPeriod);
}
// -->
function formSubmit()
{
mensaje = $('input[id=mensaje]').val();
alert(<?php echo "$target";?>);
$.mobile.changePage( "Chat.php?id=<?php echo $id; ?>&target=<?php echo $target; ?>", { reloadPage: true, transition: "none"} );
$.post("php/sendMessage.php", { id: <?php echo $id;?>,target: <?php echo $target;?> , message: mensaje } );
$("html, body").animate({ scrollTop: $(document).height() }, 1000);
}
</script>
antes de hacer elpost imprimo el valor que tiene target para ver si va correctamente: alert(<?php echo "$target";?>);
pero no,, asta ahi el cero ya no lo lleva