|
Posted by John Doe on 10/26/07 16:17
<etbalex@gmail.com> wrote in message
news:1193325679.155875.118250@d55g2000hsg.googlegroups.com...
> Why not try another Div for messages or alerts, whenever you need to
> display an alert make the DIV visible via CSS.
>
Well I have a DIV that messages display in that is refreshed via ajax every
5 seconds or so. basically, when someone sends a chat request, it just adds
a record to a mysql database, then the ajax that refreshes that DIV on my
page checks the database to see if there are any new chat requests.
Unfortunately I can't seem to get any type of javascript to work when I call
it in my PHP script that is being called by AJAX. (basically, the ajax
loads up a refresh.php that simply checks the database, then echoes a
message back to the div that says "Chat request incoming from blah blah
blah). When i try to embedd some javascript into the page to do a quick
alert("Youve Got Mail") the alert doesnt pop up, even though the rest of the
script (the php part) executes correctly. If i run the PHP script by itself,
the alert does pop up. I just dont know a whole lot about when javascript
will work and when it won't, i am kind of baffled by the problem. Its just
weird because it works when i run the update script seperately, but not when
run as an AJAX call.
Navigation:
[Reply to this message]
|