3

if a whole bunch of elements gets generated in my browser by javascript (using JSON data or just out of thin air) I am not able to fully archive such a page by saving its source. I already tried saving it as .mht file in IE, but that does not work - IE does not save the dynamically generated elements either.

An example of such a page is here http://www.amazon.com/gp/bestsellers/wireless/ref=zg_bs_nav - notice that "price" and "X new" elements do not exist in the source html but rather are dynamically generated.

If I wanted to parse this, I could work directly with the DOM by various means, yadda-yadda. But if I want to automagically save the page as html document such that it could be rendered with all the dynamically generated elements nicely rendered even while javascript is turned off, so far I am SOL.

Any suggestions?

EndangeringSpecies
  • 1,564
  • 1
  • 17
  • 39
  • have you looked into FireBug, the browser plugin (http://getfirebug.com/)? – Dutchie432 Apr 25 '11 at 19:34
  • @Dutchie432, I don't think that FireBug is capable of this. You can prove me wrong by pasting the html (including price etc) from such a FireBug-created archive of the above mentioned page here as an answer. – EndangeringSpecies Apr 25 '11 at 20:11

1 Answers1

0

In Firefox there's the Web Developer extension: https://addons.mozilla.org/en-US/firefox/addon/web-developer/

Once installed you can use View Source -> View Generated Source to access the JavaScript-modified HTML.

Ian Oxley
  • 10,916
  • 6
  • 42
  • 49