Can't read variable
<script type='text/javascript'> var toid; function reply(id){ var toid = id; // тут изменяем }; </script> then execute another script
<script type='text/javascript'> $(function() { $('#send').click(function(){ $.ajax({ type: 'POST', url: '/send.php', data: {'id': toid, .......... // тут отправляем It turns out that the void is sent. Why is the variable not written / read?