473,803 Members | 2,909 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Save Page As Web Page

SMG
Hi All,
On my website I want to provide a link with 'Save Web Page as HTML"
I wrote the following code for the same and it works

" document.execCo mmand('SaveAs', '1','TEST'); "

But it saves page content(HTML Code) and does not save images on the page
(as I had given relative path for the images in coding).
How Do I make my page save the content and images as well.

Regards,
Shailesh G
Nov 19 '05 #1
3 1165
In the browser, use File|Save As...

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"SMG" <SM*@nodmain.co m> wrote in message
news:Oo******** ******@TK2MSFTN GP10.phx.gbl...
Hi All,
On my website I want to provide a link with 'Save Web Page as HTML"
I wrote the following code for the same and it works

" document.execCo mmand('SaveAs', '1','TEST'); "

But it saves page content(HTML Code) and does not save images on the page
(as I had given relative path for the images in coding).
How Do I make my page save the content and images as well.

Regards,
Shailesh G

Nov 19 '05 #2
SMG
Buddy I want it through a JavaScript command.

"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message news:uZ******** ******@TK2MSFTN GP10.phx.gbl...
In the browser, use File|Save As...

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
What You Seek Is What You Get.

"SMG" <SM*@nodmain.co m> wrote in message
news:Oo******** ******@TK2MSFTN GP10.phx.gbl...
Hi All,
On my website I want to provide a link with 'Save Web Page as HTML"
I wrote the following code for the same and it works

" document.execCo mmand('SaveAs', '1','TEST'); "

But it saves page content(HTML Code) and does not save images on the page
(as I had given relative path for the images in coding).
How Do I make my page save the content and images as well.

Regards,
Shailesh G


Nov 19 '05 #3
If only it were that easy, I'm sure Kevin would have pointed you in
the right direction!

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 1 Apr 2005 19:33:54 +0530, "SMG" <SM*@nodmain.co m> wrote:
Buddy I want it through a JavaScript command.

"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message news:uZ******** ******@TK2MSFTN GP10.phx.gbl...
In the browser, use File|Save As...

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
What You Seek Is What You Get.

"SMG" <SM*@nodmain.co m> wrote in message
news:Oo******** ******@TK2MSFTN GP10.phx.gbl...
> Hi All,
> On my website I want to provide a link with 'Save Web Page as HTML"
> I wrote the following code for the same and it works
>
> " document.execCo mmand('SaveAs', '1','TEST'); "
>
> But it saves page content(HTML Code) and does not save images on the page
> (as I had given relative path for the images in coding).
>
>
> How Do I make my page save the content and images as well.
>
> Regards,
> Shailesh G
>
>


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1958
by: hp_1981 | last post by:
Hi Is there anyway avoiding users to save my web pages? this idea came to my mind when I tried to save a web page, but in the middle of saving progress something like the following error occurred: "unable to save the page...". on the other hand, once, I saved a web page successfully, but when I opened it the characters were completely unreadable. unfortunately I can't remember the url now but if you know any way to restrict users,
3
8564
by: fiefie.niles | last post by:
I would like to save a web page to a file and have the hyperlinks work when I bring the file back up. If the web page has a hyperlink like the following <a href="OurWeb/News/abcFile.htm">, after saving the file and showing it on the screen, and you try to click on the link, it will try to go to C:\OurWeb\News\abcFile.htm instead of www.MyWebSite.com/OurWeb/News/abcFile.htm. If I am on the website www.MyWebSite.com, and do "File" - "Save...
3
3618
by: fiefie.niles | last post by:
I would like to save a web page to a file. When I do that, sometimes the saved web page does not look like the original web page. For example, when I save www.msn.com, it looks very different the original page. How can I save the web page to look like the original (as if I do "File" - "Save As" and under "Save as Type" select "Web Page, complete (*.htm,*.html)" ? Thank you. This is how I save the web page: Set fs =...
12
4779
by: =?Utf-8?B?RnJlZU5FYXN5?= | last post by:
Hello, the scenario: There's an ASPX page which shows some text and has three buttons at the bottom: Save, Print and Close. Print and close is done by javascript. But how can I save the page on the client's computer? He/she could do this using the browser (file/save), but I need to have it done by pressing the pushbutton. In my serverside code I get the button-click-event, I also know how to get
0
9699
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10542
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10309
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9119
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5496
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4274
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3795
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2968
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.