Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5996059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:02:55+00:00 2026-05-23T00:02:55+00:00

Because I need to save a web page as a mht file format for

  • 0

Because I need to save a web page as a mht file format for a report function. But, my page is build by a Javascript framework(dojo) and the html source just like this.

<div id="main">
  <div width="99%">
    <table id="contents">
      <tr> 
        <td id="con_right"></td>
      </tr>
    </table>
  </div>
</div>

At the same time, I also have a controller to set report html to these DOM object dynamically. But I can not save this page as a mht file. Because “Save as” just base on static HTML.

So, I need help for transform a dynamic DOM object in Javascript to a static HTML page.

PS.
I can include any other Javascript framework. If there is a good and fast solution for transform.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:02:56+00:00Added an answer on May 23, 2026 at 12:02 am

    Here is an example of how to print out the source for any DOM node – you should be able to use that to print the entire page HTML.

    EDIT: You might even be able to do something easier:

    print(document.body.innerHTML);
    

    EDIT2:

    Since you want the generated html to be a static html page, pretty much the only way you’re going to (somewhat) reliably get that is to do it via the server. Send your htmlified DOM to the back end, and have the callback to a redirect to a newly-generated static page with that html.

    The implementation is between you and your back-end software, but it can have the following sort of form:

    Front-end:

    //define this function somewhere
    redirectFunction( { url: '/backend/create-static-page'
                      , params: { html: document.body.innerHtml }
                      } )
    

    Back-end:

    function create_static_page (req, res) {
       res.send(req.html)
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$('input[type=checkbox]').unbind().click(function(e){ $(this).attr('checked', true) return false; }); I NEED to return false because I have
I want to use a case statement in my user-defined functions because I need
I need to purchase SQL Server 2008 Standard edition, because it's features fit what
I have a program that I need to run under *nix and windows. because
I continuously find places where I need to use the <br /> tag because
Because regular expressions scare me, I'm trying to find a way to remove all
Because of the more tedious way of adding hosts to be monitored in Nagios
Because windows is case-insensitive and because SVN is case-sensitive and because VS2005 tends to
Because I run a blog aggregator website which checks a large list of RSS
Because Canvas3D doesn't have the ability to resize dynamically with the parent frame, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.