FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Save webpage source into javascript variable





orno
I need to save the source of a dynamic webpage into a javascript variable so that I can parse it for some particular details.

Any clues on how this can be done?

Thanks!
Ranfaroth
How do you want to parse it ?
With JavaScript ? Then you just have to get the root element (document.documentElement) and parse its nodes tree.
If you want to output it, in plain text, you can wait for browsers to implement LSSerializer.write function, or you'll have to write your own (base as before on a parsing of the nodes-tree)
Related topics
PHP IP Ban
nice background effect
Text stecked to the mouse
PHP Tutorials
Installing Apache Php and MySQL [newbie tutorial]
Get page source in javascript
I need a fool-proof anti-source view javascript.
Visual Basic Tutorial - File I/O in VB: Text Files
Help, I need LWP::Simple perl module!!
Layout Gap PRoblems with PHP/Javascript Combo
[Resolved]How to use php to replace a javascript variable?
Javascript - Unexpected results
Translate a code into javascript language (help needed)
smart phone applications
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.