If you were logged in, then you could vote. Don't wait. Login and vote now.
By bloid
via blogs.pathf.com
Published: Sep 10 2007 / 18:41
Yes, yes, innerHTML is "the debil." Direct DOM manipulation is much to be preferred. It's faster, smells less, and gives you shiny white teeth. But innerHTML, when combined with XHR, can allow you to scrape data from the existing HTML pages of a site.
SaveShareSend
Tags: css-html, javascript
Comments
FlySwat replied ago:
Wouldn't the XMLHTTPRequest be denied as cross site scripting?
I've used a similiar technique in a project of mine, and it only worked for pulling pages directly from the callers domain. As it should.
dkappe replied ago:
That's correct. You would use it to pull HTML from the current domain. As the article explains, you would use this in only certain circumstances, such as when you can't get the backend system to generate XML.
FlySwat replied ago:
Screen Scraping would be of rather limited use if you already have access to the domain.
dkappe replied ago:
Ah, FlySwat. Stay tuned for some of the interesting things you can do with screen scraping and bookmarklets.
Voters For This Link (12)
Voters Against This Link (2)