Neil wrote:
Hi
First Post here, I hope this is the right place for this post.
This is probably not a php problem, I think it may a configuration
issue, but sorry I just dont know where to look
I have a V4 site the calls an on line editor and part of the process is
by window.onload. If I had to explain how it all works I could'nt JS is
not my thing and this is a fairly old piece of code.
anyways
-------------------------- Have a bit of code that looks like this
.
.
<body leftmargin="2" marginwidth="2" topmargin="2" marginheight="2"
onResize="blockDefault();">
content;
include($settings['app_dir'].'/js/core_js.php');
echo <<<content
<script LANGUAGE="Javascript">
window.onload=initEditor
</script>
<table border="0" cellpadding="5" cellspacing="0" width="100%"
height="100%" class="framed">
.
.
.
----------------------------------------------------------
Under My V4 Sever it works fine .....the Java script loads and an all is
fine.
On my V5 Sever
I get the following Errors
Line: 68
Char: 21
Error: Syntax error
Code: 0
URL: ......
and then
Line: 600
Char: 11
Error 'initEditor' is undefined
Code 0
URL........
Now the thing is, when I view source code in IE off both servers the the
core_js.php is being read and is visible, the initEditor function is
there for all the world to see.
If I rename the initEditor function on the V5 version and add a new
empty function I still get the same error messages.
I dont have much hair and I am tearing out the rest as we speak :).....I
have no idea where to look so I am just hoping someone can point me in
the right direction.
Like I said in the beginning I think it must be a configuration issue
but I just dont know what or where.
Anyways TIA
Cheers
Neil
Two things come to mind.
1) Is their any PHP inside you javascript file that needs to be parsed? And if
so, is the new V5 install configured in such a way that it parses/processes
javascript files? where the old install was processing javascript files. This
would be a configuration issue from the actual web server POV. i.e. Apache,
lighttpd, etc... Once reconfigured, make sure you restart your web server.
2) Is your code using short tags in php? This allows the programmer to use <?
instead of <?php . In this case you might want to enable short tags in the
new version of PHP. I think php 5 comes with short tags disabled and version 4
had it enabled by default. This setting would be found in your php.ini file on
the server. If you need to change the setting, make sure you restart your httpd
server before testing.
Just a couple of thoughts
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php