Advertisement Jump to content
Sign in to follow this  
EvilCrap

[web] document.open

This topic is 4878 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

document.open seems to erase all of the current html. Is there a way to fetch the html before an open, so that I can write it back out with other stuff? For instance, I would like to preserve style definitions in the header, and various inputs in the body, but I would like to write out additional inputs.

Share this post


Link to post
Share on other sites
Advertisement
If you just want to add a few things then it might be easier actually adding to the current page, instead of saving off the old page, opening a new one and splicing the old contents back in. Have a look at the innerHTML property or at XML-DOM scripting to do that.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!