> Hi all ,
>
[quoted text clipped - 12 lines]
>
> Can you tell me the reason and how to fix it ?
Hi
This has nothing to do with PHP.
The browser receives just HTML from a server and couldn't care less if that
is produced by PHP, VB, Perl, blue midgets, or just random noise.
So if you wonder why some piece of HTML doesn't work, look at the source of
the page first.
In your case you will find:
<script type="text/javascript">alert('hi');</script>
That should work in principle.
Maybe IE doesn't like to receive all commands on 1 line?
Maybe Javascript is disabled?
Maybe an earlier error on the page is causing this?
Hard to say.
I would start by adding \n after each echo.
Off topic: Why echo all the lines and give yourself a hard time?
This is perfectly legal in PHP and keeps the suff readable for you too:
constructor func .......
{
// just jump to HTML literal mode:
?>
<script type="text/javascript">
alert('hi');
</script>
<?php
// back in PHP
}
Regards,
Erwin Moller
pulkit.gaur@gmail.com - 30 May 2006 16:14 GMT
Thanks Erwin,
But i already tried this .
Thomas 'PointedEars' Lahn - 30 May 2006 23:20 GMT
> Thanks Erwin,
>
> But i already tried this .
Tried what? <URL:http://jibbering.com/faq/>
PointedEars

Signature
But he had not that supreme gift of the artist, the knowledge of
when to stop.
-- Sherlock Holmes in Sir Arthur Conan Doyle's
"The Adventure of the Norwood Builder"
Lasse Reichstein Nielsen - 30 May 2006 23:42 GMT
> But i already tried this .
(Tried what? Please quote an appropriate part of what you are responding to).
Anyway, then the problem is probably somewhere else on the page. Can
you give a link to the page that is served so we can see for ourselves?
/L

Signature
Lasse Reichstein Nielsen - lrn@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'