How to change HTML file extension as .mht using HTML code ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • VishalK
    New Member
    • Jan 2007
    • 2

    How to change HTML file extension as .mht using HTML code ?

    Friends..
    I have a HTML file.
    Using HTML Code, I want to change its file extension from .html to .mht.
    eg : TestFile.html to be converted to TestFile.mht
    Anybody has any idea about this ? Please let me know.
    Thanks in advance.

    Regards,
    Vishal
  • pravinda
    New Member
    • Dec 2006
    • 23

    #2
    just open the page in iexplore and select mht in save as type.

    Comment

    • VishalK
      New Member
      • Jan 2007
      • 2

      #3
      Hi,
      I know by using "save as" option, we can save the file in .mht format.
      However, my concern is - I want HTML Code to perform this activity.
      Can we write something in HTML using which we can perfrom above operation ?

      Comment

      • AricC
        Recognized Expert Top Contributor
        • Oct 2006
        • 1885

        #4
        Originally posted by VishalK
        Hi,
        I know by using "save as" option, we can save the file in .mht format.
        However, my concern is - I want HTML Code to perform this activity.
        Can we write something in HTML using which we can perfrom above operation ?
        HTML can't do this.

        Comment

        • drhowarddrfine
          Recognized Expert Expert
          • Sep 2006
          • 7434

          #5
          HTML is a "markup" language, ie, it describes content. It is not a programming language.

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Even Javascript can't (or shouldn't) be able to do that, and it's a programming language! Why do you want to do it with HTML only? Could you not use a programming language? And which files are you trying to change the extension of? Files on the client or the server? If it's on the client, then that shouldn't be allowed.

            Comment

            • AricC
              Recognized Expert Top Contributor
              • Oct 2006
              • 1885

              #7
              Also, not really sure what you are planning on doing this for/to but if you make the browser something other than a recognized file type it will display in a plain text format.

              Comment

              Working...