I have a page written in html and javascript that works fine. The very first line of this page is:
The browser renders this page in standards compliant mode with browser source showing horizontal numbered lines running vertically down the page just as they do in the server file.
Example:
Code:
1 horizontal line one
2 horizontal line two
etc
I added a login form that posted username and password to a php script that echoed this very same page back to the browser.
Now, the javascript does not work at all (only the html and css do), and the browser goes into quirks mode and shows the source code running across the source page in one very long horizontal line.
Example:
Code:
1 one very long horizontal line
There are no php errors, which is why I don't think this is a php question.
Does anyone know what it means when a browser puts all the code on 1 long horizontal line, and goes into quirks mode when the code is the same as when it went into standards compliant mode (except it was not wrapped in php), and why this would prevent all javascript from working?
Do I need to add a header or something?
I put an example of what I mean by wrapping below. I'm not asking a php question (I don't think), but I'll give this example anyway:
Code:
$variable = "<!DOCTYPE>":
$variable .= "<html>"
echo "$variable";
I'm not posting the code itself right now because it would be really long and possibly exceed the character limit. Hopefully there is a simple answer to this that does not require posting of the code.
I'll try to if someone asks. Thanks