General Question about where code in a JavaScript goes
Wilson Mui
Ranch Hand
Joined: Apr 09, 2003
Posts: 140
posted
0
I am a newbie in javascripts and the whole DOM model. I am just wondering where the dynamic html code that you created go exactly. What I mean is that if I look at the source file of an .html page it won't have the code that I create dynamically in there. Exactly where does the browser store the dynamic code? Is the browser actually displaying then some cached version of the webpage which is constantly being updated by the javascript?
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15003
posted
0
You can not view the code by hitting view source since the view source looks just at the orginal core document. To see all of the dynamic stuff that was written out you need to look at the body's innerHTML. Here are two ways to do it. Paste the line into the address bar of the page that you want to see the cde of. FOR IE you can use
which will paste the code into your clipboard for all browsers you can use this
which will make a text area with the code See if this helps you out... Eric
subject: General Question about where code in a JavaScript goes