Streetdaddy
Programmer
Further to a problem I was having where everytime I go to this page for the first browser session e.g. Internet Explorer opened, a javascript "object expected' error occurs. It's generated from js code used on the page for a dynamic menu. Finally I have realised that php is outputting the php session id in the js string and it seems to be causing a problem (i think), because when I refresh the page, the php session id is no longer in the js string and there is no js error generated.
This is the code in the javascript file that is included:
content[1] = content[1] + "<tr><td><img src=\"images/nav_sub_spacer.gif\" width=\"22\" height=\"12\" border=\"0\"><a href=\"?pgWeatherBOM\" class=\"dhtml\"><strong>BOM Info</strong></a></td></tr>";
Then here is the code that is output on the first page view:
content[1] = content[1] + "<tr><td><img src=\"images/nav_sub_spacer.gif\" width=\"22\" height=\"12\" border=\"0\"><a href="\?PHPSESSID=851760968a90d8844ce0dda7d6980d6d""?pgWeatherBOM\" class=\"dhtml\"><strong>BOM Info</strong></a></td></tr>";
Notice the part in red? Where did that come from?
Then after page has been refreshed:
content[1] = content[1] + "<tr><td><img src=\"images/nav_sub_spacer.gif\" width=\"22\" height=\"12\" border=\"0\"><a href=\"?pgWeatherBOM\" class=\"dhtml\"><strong>BOM Info</strong></a></td></tr>";
So after the refresh, the php session id is gone, and there is no javascript error? Can anyone tell me why
?PHPSESSID=851760968a90d8844ce0dda7d6980d6d""
is being output?
ps. the js functions are included like this:
'index.php' includes 'includes/navigation_js.php'
'index.php' includes 'includes/header.php' which contains a function that outputs the <body> tag with an onLoad call to a function in 'navigation_js.php'. The js error points to the line with the body tag.
Miles
Those Micros~1 guys sure know what they doing!
This is the code in the javascript file that is included:
content[1] = content[1] + "<tr><td><img src=\"images/nav_sub_spacer.gif\" width=\"22\" height=\"12\" border=\"0\"><a href=\"?pgWeatherBOM\" class=\"dhtml\"><strong>BOM Info</strong></a></td></tr>";
Then here is the code that is output on the first page view:
content[1] = content[1] + "<tr><td><img src=\"images/nav_sub_spacer.gif\" width=\"22\" height=\"12\" border=\"0\"><a href="\?PHPSESSID=851760968a90d8844ce0dda7d6980d6d""?pgWeatherBOM\" class=\"dhtml\"><strong>BOM Info</strong></a></td></tr>";
Notice the part in red? Where did that come from?
Then after page has been refreshed:
content[1] = content[1] + "<tr><td><img src=\"images/nav_sub_spacer.gif\" width=\"22\" height=\"12\" border=\"0\"><a href=\"?pgWeatherBOM\" class=\"dhtml\"><strong>BOM Info</strong></a></td></tr>";
So after the refresh, the php session id is gone, and there is no javascript error? Can anyone tell me why
?PHPSESSID=851760968a90d8844ce0dda7d6980d6d""
is being output?
ps. the js functions are included like this:
'index.php' includes 'includes/navigation_js.php'
'index.php' includes 'includes/header.php' which contains a function that outputs the <body> tag with an onLoad call to a function in 'navigation_js.php'. The js error points to the line with the body tag.
Miles
Those Micros~1 guys sure know what they doing!