Dear Lazyweb: javascript edition
May. 6th, 2006 03:01 pmHow do I execute some javascript and see the real output?
For example, if you look at this page you will see a text box in the middle of the screen. It's generated by calling the java script function "CAdrawbox('standard', '550')". If you check the source code in the browser you just see "CAdrawbox('standard', '550')". I want to see the HTML that the function output.
I've extracted the javascript to a file called foo.js but loading it into a browser just shows me the output (I believe).
Suggestions? I need to scrape this HTML (just once) for use on another project related to the website.
For example, if you look at this page you will see a text box in the middle of the screen. It's generated by calling the java script function "CAdrawbox('standard', '550')". If you check the source code in the browser you just see "CAdrawbox('standard', '550')". I want to see the HTML that the function output.
I've extracted the javascript to a file called foo.js but loading it into a browser just shows me the output (I believe).
Suggestions? I need to scrape this HTML (just once) for use on another project related to the website.
no subject
Date: 2006-05-06 08:40 pm (UTC)This will show you rendered page in it's current state. This is invaluable when you're writing JS that updates the page on the fly.
no subject
Date: 2006-05-07 04:40 pm (UTC)Sadly, I've already walked through the code manually to determine what it was outputting. Ugh. The result is that I now turn an RSS feed into something that people can #include on their web site if they want a box like this.