|
Posted by Rik on 05/30/06 12:45
pulkit.gaur@gmail.com wrote:
> Hi all ,
>
> I have a PHP class.
> In the constructor method i use the following code :
>
> constructor func .......
> {
> echo "<script type=\"text/javascript\">";
> echo "alert('hi');
> echo "</script>";
>
> }
>
> This works perfectly fine in Mozilla ..
> But .. seems .. IE can't run this code ..
According to this, you echo "alert('hi');>\n echo " to the browser, and the
loose </script> would cause PHP to fail... Is this the actual code??
> Can you tell me the reason and how to fix it ?
You'd better look at the source, and post that to a javascript ng.
Maybe it's just simply:
echo "<script type=\"text/javascript\">\n";
echo "alert('hi')\n";
echo "</script>";
Then again, I don't know javascript....
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|