Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- php reference in
February 8, 2007, 1:27 pmrate this thread
I have some problems with a PHP reference in a <SCRIPT> tag, but only
with the Internet Explorer, which gives a "Error on page" message in
the Status Bar.
The code is as follows :
var stat =<?php echo stripslashes($status); ?>;
window.status = stat;
The error given is :
Error: Syntax error
Char 13 is the "<" or looking to the source of the page with the IE
browser, it's ";"
I get the error message as said before only in the Internet Explorer
browser and it does not affect the display nor the functionality of
the page, but it's not good looking ...
Has anyone out there a solution to get rid of the "error" ?
Thanks in advance.
Re: php reference in
You shouldn't even see the php code in your script. It should have been
executed by the server. Is this what the actual source code in your
page looks like?
Is the rest of your PHP code on that page being parsed and executed?
Also, what happens if you get rid of the <!-- ... --> delimiters - which
were only required for browsers which came out > 15 years ago?
Remove the "x" from my email address
JDS Computer Training Corp.