473,385 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

saving current page in .mht format using execCommand

theGeek
11
Hi All,

I want to save the current page using javascript(in asp.net). Though I could find out that the "execCommand" can do that but the only options for file types that are available in the save as dialog include .htm,.html and .txt.

My problem here is how can I save the current page in .mht format using the same command?

Is this possible? If not how can I do that?

Please help!!!!!!!!!!!
Oct 30 '07 #1
5 4623
acoder
16,027 Expert Mod 8TB
I don't think it's possible using execCommand. It's also not JavaScript, but proprietary JScript.

You can save in .mht format from the File..Save As... menu.
Oct 31 '07 #2
theGeek
11
I don't think it's possible using execCommand. It's also not JavaScript, but proprietary JScript.

You can save in .mht format from the File..Save As... menu.
Hi acoder,

Thanks for replying!

Is there any other way of saving the page in .mht(or just any supported format) using javascript, C# or any other language?

Cuz I would want to place a link on the page that opens in a popup window with all menus and bars disabled and that saves the page to user's disk.

Also, you said earlier "It's also not JavaScript, but proprietary JScript". Could you please explain that? Did you mean execCommand is not javascript and it is JScript?

Hoping for a positive reply(or atleast a ref :) )!!!
Thanks!!!
Nov 1 '07 #3
Even I'm looking for the same. Can we save the file as mht to retain the css formatting after saving...... Or is there any other means of acheiving it.....
Nov 29 '07 #4
acoder
16,027 Expert Mod 8TB
Is there any other way of saving the page in .mht(or just any supported format) using javascript, C# or any other language?
Not with JavaScript, but you could try VB.
Also, you said earlier "It's also not JavaScript, but proprietary JScript". Could you please explain that? Did you mean execCommand is not javascript and it is JScript?
execCommand is supported by other browsers too, but not execCommand("saveas"...).
Nov 30 '07 #5
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!
Even I'm looking for the same. Can we save the file as mht to retain the css formatting after saving...... Or is there any other means of acheiving it.....
This won't be possible with JavaScript. You could try an ActiveX/vbscript solution.
Nov 30 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Kevin Ingram | last post by:
Ok, this is probably a silly question but I just keep hitting a brick wall here. I usually develop my sites entirely in ASP and use a database for data storage, works great for me. I also...
3
by: lir | last post by:
Hi, I am trying to save a fram in a page using the execCommand("saveas") the html is save currectly but I can not save the gif on that page. How can I save the fram with the gif via...
5
by: Rami A. Kishek | last post by:
I'm new to js. Please help me figure this out WANT: Client to save an image to disk pressing a "download" button. The image name is dynamic, from JS code on another part of the page DID: Read...
1
by: anonieko | last post by:
> Use x = window.Open(...) x.document.write( yourhtml) > How to print from javascript using .print > How to use ContentWindow > > How t use getElementById > How to get HTML of document...
7
by: James P. | last post by:
Hello there, In my asp.net page using VB, I have a date text field in mm/dd/yyyy format. When a date is entered, I'd like to validate it to make sure the date is greater than or equal to the...
2
by: =?Utf-8?B?Um9iZXJ0SGlsbEVEUw==?= | last post by:
I have classic asp files (IIS6) that need to be saved in UTF-8 format. I save a file with Notepad using SAVE-AS & UTF-8 format. If I reopen the file using Notepad and bring up the save-as dialog...
4
mehj123
by: mehj123 | last post by:
Hi, I want to save data in a html table in the .csv format. I am able to save the data in a normal text file by using the command <button...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.