Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > How to get the web page's html source code generated by javascript

Reply
Thread Tools

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

 
 
cttseng@csie.nctu.edu.tw
Guest
Posts: n/a
 
      11-21-2006
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%2bpark

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?

 
Reply With Quote
 
 
 
 
RobG
Guest
Posts: n/a
 
      11-21-2006

(E-Mail Removed) 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%2bpark
>
> 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/co...46e77347cded73
>



--
Rob

 
Reply With Quote
 
 
 
 
Jeremy
Guest
Posts: n/a
 
      11-21-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) 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%2bpark
>
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
is there a way to "include" source file B.html in source file A.html? Cloud Burst HTML 11 01-09-2004 02:49 AM
Show the true html source of a web page (including that generated by script). Sandip Chitale Javascript 0 11-20-2003 06:22 AM
viewing javascript generated html code Neil Morris Javascript 1 09-21-2003 10:40 AM
Web Form Designer Generated Code - Get Me Outta Here!! :-) Leeor Geva ASP .Net 1 08-22-2003 12:01 AM



Advertisments