aspnetguy Posted August 4, 2006 Share Posted August 4, 2006 I know I can get the contents of the page with document.body.innerHTML but is it possible to get the entire html code of the page?I need to get everything between <html> and </html>. Is this possibel with javascript? Link to comment Share on other sites More sharing options...
boen_robot Posted August 4, 2006 Share Posted August 4, 2006 I'm not very experienced at DOM, but what is the documentElement object suppose to do? On W3Schools' refence it says "Returns a reference to the root node of the document". Could it be the thing you need? Or maybe getElementsByTagName("html")?[edit] I can't believe myself. Me, a person with no JavaScript or DOM skills whatsoever, to actually help someone with a DOM problem. Just the thought of it makes me laugh [/edit] Link to comment Share on other sites More sharing options...
aspnetguy Posted August 4, 2006 Author Share Posted August 4, 2006 I'm not very experienced at DOM, but what is the documentElement object suppose to do? On W3Schools' refence it says "Returns a reference to the root node of the document". Could it be the thing you need? Or maybe getElementsByTagName("html")?Thank you...I feel like an idiot. I have been fighting to load a page (on same domain) in a hidden iframe then read the entire contents opf the frame to pass to ajax to then pass to .Net to generate a static page....its a long story but it is a workaround to a problem our companies CMS has with not getting indexed by google because of 2 automatic redirects the app does whne the site first loads.Anyways it works...thank you. My brain is fried today Link to comment Share on other sites More sharing options...
Jack McKalling Posted August 4, 2006 Share Posted August 4, 2006 Well done boen_robot, good for you I would have suggested the same, and I am more experienced in DOM.. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now