In comp.lang.javascript message <05vkf7t9vfcps7dcil66bnqtdk33ua2ngv@4ax.
How do I view the generated page? I do not mean the source, but
the result of the source. I could -- read as "quite probably do" --
have errors in my JavaScript, and it would be easier if I could see
what page has resulted from my code.
Ocularly.
You should say what sort of system you are using, in case it matters.
Remember that your operating system is almost certainly not called
"Window".
I just edit the source file (in PFE, at top left) and have a browser
(generally Firefox, not maximised, top right) open. An incantation such
as file:///C:/wsh/seek/seakfyle.htm#elsewhere can be entered in the
address bar. All my browsers can read that, though Opera replaces it
with file://localhost/C:/HOMEPAGE/FREQUENT.HTM which Firefox can
read ...
You can also go via "My Computer", find the desired HTM or HTML file,
and double-click on it.
Then I cycle through Edit, Save, refresh browser, as nauseam.
Opera allows the reader to edit the "view Source" of the page being
viewed, and view or save it. Using that, you ___could__ edit in Opera,
check-view in Opera, save, and real-test in IE.
For some testing, it is better to use the page from your real ultimate
public web server. Generally, AIUI, instead of that, one can install a
private server on one's local computer.
But you should not, I think, think that there is _necessarily_ within
the displaying machine an HTML version of what is seen. If you code
<p>para1</p> <p>para1</p>
<p ID=GW></p> it looks like <p>para2</p>
<p>para3</p> <p>para3</p>
after executing documemt.getElementById("GW").innerHTML = "para2"
but the displayed object is a tree structure of DOM elements rooted in
the document object (which is apparently parentless). Play with
<
http://www.merlyn.demon.co.uk/js-props.htm#F> and, possibly aided by
the instructions, you will see that.
You may find that setting a textarea's value to document.body.innerHTML
shows what you want to see.
For "scratchpad" tests, I use a local copy of
<
http://www.merlyn.demon.co.uk/js-quick.htm>.
You can write the results of your script to, say, a textarea as well as
into, say, the target <DIV>.
But it's not at all clear to me where your difficulty arises.