tags:

views:

45

answers:

2

You know, like the "Compose Mail," "Inbox," "Sent Mail," etc., on the left hand-side when you load up GMail? I did a search for "Compose Mail" in the page source and got nothing.

+3  A: 

The Gmail interface uses JavaScript to dynamically load a lot of stuff. That explains why you don't see "Compose Mail".

If you want to see how the final HTML document looks like, then here is my method:

  • Install the "Web developer" Firefox extension
  • Click Tools> Web Developer> View Source> View Generated Source
  • Nicolas Raoul
    +1 although I do recommend Firebug over the Web Developer extension. I have both but I rarely use WD for anything anymore, Firebug is just so much more useful.
    David Zaslavsky
    Indeed. I also use both of them :-)
    Nicolas Raoul
    How come I still cannot find "Compose Mail" in the generated HTML?
    wrongusername
    @wrongusername You're right, can't find it either. I'm confused...
    Nicolas Raoul
    +2  A: 

    It's all Javascript. Here's how you can get at that information yourself: if you don't already use Firefox, download it, and then install the Firebug extension. Among other features, it'll let you click on any component of the page and show you the corresponding location in the source - not just the original page source, but the source after all the Javascript has taken effect.

    Actually, if you use Internet Explorer, the IE Developer Toolbar (included in IE 8) does something similar, although I haven't used it much myself.

    David Zaslavsky
    How come I still cannot find "Compose Mail" in the generated HTML? Raoul doesn't know either :(
    wrongusername
    No idea, I found it just fine using Firebug's "Inspect" tool. (It's the mouse-cursor-over-the-box icon next to the bug at the top left of Firebug when on the HTML tab)
    David Zaslavsky
    +1 Firebug shows it whereas Web Developer does not. I wonder what makes the HTML sources different.
    Nicolas Raoul