Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving source code to a file

Status
Not open for further replies.

qsac

Programmer
Jan 22, 2002
242
US
Is there a way I can save the source code of my page into a file? or a variable?
 
What do you mean? When you create the page, aren't you working in the "source code"?
 

It's possible that you could load the contents of your own page into a hidden IFRAME and then read the innerHTML of the IFRAME's document.

While I'm pretty sure this wouldn't work if the IFRAME content was at a different domain to the host page, if the content was at the same domain (which it would be), then it might just work.

Hope this helps,

Dan
 
I imagine qsac is using a dynamically generated page, and wants to save off the generated HTML.

In which case - as ChrisHunt says - (and depending which browser you use): Open the page in your browser --> 'View Source' --> File --> Save As.

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top