You are here: Re: IE Problem : Dynamic Javascript in PHP constructor « PHP Programming Language « IT news, forums, messages
Re: IE Problem : Dynamic Javascript in PHP constructor

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация