[SOLVED] Calling a Javascript function
Posted: Wed Feb 02, 2005 6:17 pm
Ive seen this question asked tons of times, but for something different.
This cant be done through an event.
i want to execute a java script function when server sends certain info.
But i cant just do the
echo <script>;
echo TheFunction();
echo </script>;
because it keeps adding to their html uhh is it called cache? lol
view source and it shows up, i need a way to just call it through php.
ex of what i mean:
function msgbox(msg)
{
alert (msg);
}
server sends "message: blah"
case = "message":
(this is where i need to call function without using echo/print)
any hints??
thanks
This cant be done through an event.
i want to execute a java script function when server sends certain info.
But i cant just do the
echo <script>;
echo TheFunction();
echo </script>;
because it keeps adding to their html uhh is it called cache? lol
view source and it shows up, i need a way to just call it through php.
ex of what i mean:
function msgbox(msg)
{
alert (msg);
}
server sends "message: blah"
case = "message":
(this is where i need to call function without using echo/print)
any hints??
thanks