There are no
document.write() calls. In working with XHTML documents in the past, I have learned insert element nodes with DOM method calls with script elements if somehow I need to dynamically play with doc structure.
Try this URL:
http://smhscience.scienceinteractive.org/tutoring/I did another check of the markup (HTML 5 by the way) on W3 validator and it passes, so that is not a confounding problem. I also noticed the page was saved as Western European encoding while there was a UTF-8 meta element in it, and so I saved it as UTF-8 without BOM and checked it, and it still does same thing. I am working with FF 31.0 and FB 2.0.2
First let me describe the page in which there is a form that handles the javascript:
There is form that will help estimate the cost of tutoring when it is eventually debugged. The form has several controls for selecting tutoring details that help to estimate the final cost.
As part of the debugging for the form in all cases, a function called
randomChoices() is activated by a button control that says "Random Choices" and it sets up a random number to populate/set the controls, and give a result presented to the buyer of tutoring services. Additionally a button control called "Break It Down For Me" appears, which when pushed calls a "breakDown" function, which then causes a table to appear with a breakdown of the computations (this is still in the process of being debugged). This table is for debugging purposes particularly but will like be included for the final presentation.. [Note that the final styling/appearance of the page is far from complete too.]
Now here is what you can do to reproduce the bug:
1. Load the page
2. Look for the inline markup/script in Script tab of FB
3. Go ahead and click Random Choices button, then Break It Down For Me button after it appears. I don't believe step 3 is really required at all anyway
4. Reload the page (F5): I would do this after an edit to the page in a separate editor (RJ Text Edit) to put in the new script.
The Script tab then changes to show in my FF/FB panes a single code line (#1) which is
intializePage().
This clearly refers to the call in the
body onload attribute value (line
584 in the document), not the function defintion on line 50 of the doc.
The script runs of course: it just doesn't show under the Script tab with any of the markup.
Perhaps you have seen this before and know what's happening.