How to get the web page's html source code generated by javascript

Discussion in 'Javascript' started by cttseng@csie.nctu.edu.tw, Nov 21, 2006.

  1. Guest

    Dear all,
    I have a problem that how to get the page's source code
    which is generated by javascript code?

    For example:
    http://grouper.com/video/south+park

    Although I can see the result page which contains pic and
    description of each video. But when I see the source html code,
    I just can see the section is generated by javascript function.

    Is there a way to get the output result of javascript function?
    , Nov 21, 2006
    #1
    1. Advertising

  2. RobG Guest

    wrote:
    > Dear all,
    > I have a problem that how to get the page's source code
    > which is generated by javascript code?
    >
    > For example:
    > http://grouper.com/video/south+park
    >
    > Although I can see the result page which contains pic and
    > description of each video. But when I see the source html code,
    > I just can see the section is generated by javascript function.
    >
    > Is there a way to get the output result of javascript function?


    Firefox with the savegenpage extension:

    <URL: https://addons.mozilla.org/firefox/2262/ >

    Or use a bookmark that gets the page's innerHTML:

    <URL:
    http://groups.google.com.au/group/c...nerHTML bookmark robg&rnum=3#6246e77347cded73
    >



    --
    Rob
    RobG, Nov 21, 2006
    #2
    1. Advertising

  3. Jeremy Guest

    wrote:
    > Dear all,
    > I have a problem that how to get the page's source code
    > which is generated by javascript code?
    >
    > For example:
    > http://grouper.com/video/south+park
    >
    > Although I can see the result page which contains pic and
    > description of each video. But when I see the source html code,
    > I just can see the section is generated by javascript function.
    >
    > Is there a way to get the output result of javascript function?
    >


    The "View Rendered Source Chart" extension for Firefox is indispensable;
    you can also try a 'bookmarklet' like this one in Firefox if you only
    want raw source code instead of the rendered chart:
    javascript:void
    window.open("view-source:data:text/html,"+escape(document.getElementsByTagName("html")[0].innerHTML));

    Gives you a new window containing highlighted HTML of the contents of
    the current document. (Note: only the contents of the root node - which
    means it's missing the root node itself and anything outside of that.)

    Jeremy
    Jeremy, Nov 21, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?c2FtZWVy?=
    Replies:
    1
    Views:
    904
    Bruce Barker
    Oct 4, 2005
  2. Cloud Burst
    Replies:
    11
    Views:
    1,016
  3. Neil Morris

    viewing javascript generated html code

    Neil Morris, Sep 21, 2003, in forum: Javascript
    Replies:
    1
    Views:
    116
    Martin Honnen
    Sep 21, 2003
  4. Sandip Chitale
    Replies:
    0
    Views:
    78
    Sandip Chitale
    Nov 20, 2003
  5. Replies:
    6
    Views:
    215
    Thomas 'PointedEars' Lahn
    Mar 20, 2006
Loading...

Share This Page