123456 should be displayed in the alert, but unfortunately, undefined is displayed :(
<script type="text/javascript"> function _query(id) { setInterval(function() { $.get('/query.php', function(data) { if(data == 1) alert(id); // undefined }); }, 10000); } _query(123456); </script>
undefined
? This code is fully working. - lampa