That's a great question and I have often wondered that myself. When I view
source, I expect to see the source for whats on my screen, not the original
html file.

Thinking through the process, reveals a practical answer: In a normal
process, the original code is downloaded from the server, rendered and then
stored.  Any modifications that happen are extraneous to the original.  When
you hit the refresh button, dates are compared and only newer versions of
files are downloaded and the rendering can happen all over again reflecting
the changed files.  If no files are changed, the rendering happens much
quicker.

During the modification process, the original html is not whats modified,
the displayed object is modified semi-directly... I say semi because even
though you are submitting the mods using html/css, javascript is
interpreting that and directly modifying only the object that needs
modifying.  If javascript modified the original html the entire rendering
process would have to be redone and that would cause very annoying screen
refreshes.

On Thu, Feb 17, 2011 at 7:28 PM, Jeffrey Lee <[email protected]> wrote:

> So why is it that when Javascript is updating the document, does the source
> not show the change?  Does show->source merely reflect that which was
> loaded, but not the actual current document?  Why is that?
> ___________________________
> Jeffrey Lee
> http://www.jeffreyalanlee.com
> [email protected]
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to