Forum Moderators: coopster
Most of my pages use PHP. They load fine--unless I have a form on the page. In that case, it displays fine when empty, but after I validate it with JavaScript and send it to itself to process the data (more validation and sending of emails) the page doesn't display. The symptom is that although the page seems to finish loading (view source shows what appears to be the complete page), in Opera and Navigator, all I see is the css background image. The text, forms, etc. aren't there.
Oddly, these pages still send the emails, which is one of the last steps before display.
In Opera there is a status bar at the bottom of my window that reports:
document: 100%
images: 4/4
total: 0 b
speed:?
time: 105:20 (minutes and seconds)
completed request to wwWebmasterWorldebsite.com
The clock is still counting 2 hours later, as though it's waiting for something.
My error logs don't show any problems, that I can tell. The status codes were 304 and 200, so it's possible, I suppose, that a dated version of the files is being accessed.
I don't get quite as much info from Navigator, but the same basic behavior.
Internet Explorer seems to ignore whatever the problem is and shows the pages just fine.
I've tried using a blank css file, stripping out lots of the code. I think next I'll try looking in the common .ssi files for the header and footer for irregularities.
Does anyone have any other ideas? It's had me stumped all day!
But--I did find the problem by taking the downloaded page's view source and slowly cutting out parts.
It's this:
<script type="text/javascript">
//<![CDATA[
document.location="#signup";
//]]>
</script>
That stumps Opera and Netscape Navigator.
Knowing the problem is half way to a solution. Any ideas?
I've tried location.hash and I've tried using the hash in the form tag:
<form action="staffTraining.php#signup"..... Neither of those works. (Netscape seems more tolerant, than Opera and at least displays the page.) Is there another way to use php or javascript to go to a specific place on a page? (Using the body tag didn't work because Symantec's software corrupts the quotes in the onload.)
<?php
$goTo = "'#signup'";
if (isset($_POST['submit'])) // if form was submitted, use onload body tag
{
?>
<body id="top" onload="location.href=<?=$goTo?>;">
<?php
}
else // form not submitted, use plain body tag
{
?>
<body id="top">
<?php
}
?> Symantec adds an extra ";", but that doesn't seem to hurt.
<body id="top" onload="var SymTmpWinOpen = window.open; window.open = SymWinOpen; location.href='#signup';; window.open = SymTmpWinOpen;"> Thanks for helping!