D
Dave
I am having some difficulties getting some inline js code to run when
retrieved via AJAX by XMLHTTPRequest.
Basically I am running a php script every 15 secs or so that does a query of
a mysql database, checks to see if any new chat requests have been sent to
the user, and if so, it is simply returning them via a "echo" statement, and
the info is placed into a DIV in my sidebar.
Now when I add something in like:
<script type="text/javascript">
alert('you have a chat request');
</script>
it runs if i go ahed and run the script by itself, i get the chat requests
and the alert to popup. When the script is called via AJAX and loaded into
the div, I get the message from the mysql query about chat info, but no
javascript alert.
Am i just missing something stupid here? Like I said, it works when I run
the script by itself, just not when called via XMLHTTPRequest.
Thanks for any help.
retrieved via AJAX by XMLHTTPRequest.
Basically I am running a php script every 15 secs or so that does a query of
a mysql database, checks to see if any new chat requests have been sent to
the user, and if so, it is simply returning them via a "echo" statement, and
the info is placed into a DIV in my sidebar.
Now when I add something in like:
<script type="text/javascript">
alert('you have a chat request');
</script>
it runs if i go ahed and run the script by itself, i get the chat requests
and the alert to popup. When the script is called via AJAX and loaded into
the div, I get the message from the mysql query about chat info, but no
javascript alert.
Am i just missing something stupid here? Like I said, it works when I run
the script by itself, just not when called via XMLHTTPRequest.
Thanks for any help.