Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

JavaScript - Frame Source (Dynamic)

Guys, I am going nutty trying to figure this out!!!

I have to capture an HTML 'snapshot' of a dynamic page and then save the
source to a static HTML page. The reason is that I want to give my users
a 'preview' of what the static page will be and allow them the option to
keep it, or refresh and try again with the potential of different
results (because it is dynamic).

What I'm trying to do now, is open the page in a different frame, and if
the user chooses to keep the page, I want to retrieve the HTML from that
frame. However, I have not found an object in the DOM that will return a
document's HTML source.

Any Ideas? I'm open to other solutions. Keep in mind that I can not do
another HTTP call because that may load a different page, as it is
dynamic. Also, If possible, I'd rather not make changes to this dynamic page.

0
wwwmaster
Asked:
wwwmaster
1 Solution
 
brisbineCommented:
document.body.innerHTML

will return the innerHTML of the window.  Alternatly you can use [framename].document.body.innerHTML
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now