473,386 Members | 1,835 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,386 software developers and data experts.

output page source

i'm sure everyone has used the View Source option off the rmb menu to look
at the source of a page. question: is there a way to output the source of a
page to a file at run time via a button or something on the page itself??
Nov 18 '05 #1
2 999
Hi, Slipperman,

Try on the client-side the following:

document.documentElement.outerHTML

It returns everything between the <html></html> tags, including these.

Greetings
Martin
"Slipperman" <Xs**@Xearthlink.net> wrote in message
news:Fb******************@newsread3.news.atl.earth link.net...
i'm sure everyone has used the View Source option off the rmb menu to look
at the source of a page. question: is there a way to output the source of a page to a file at run time via a button or something on the page itself??

Nov 18 '05 #2


Slipperman wrote:
i'm sure everyone has used the View Source option off the rmb menu to look
at the source of a page. question: is there a way to output the source of a
page to a file at run time via a button or something on the page itself??


Well, browsers usually provide
File->Save As
in their menu, with IE you can try client side JavaScript
<input type="button" value="save page"
onclick="if (document.execCommand) {
document.execCommand('SaveAs');
}">

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 18 '05 #3

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

Similar topics

2
by: Jesper Moth | last post by:
The MSXML4 xslt-parser would output any source <div/> like this: <div></div> I never figured out how to disable this behaviour. But since it makes the source document look cleaner, and since...
3
by: Albert Spencil | last post by:
It once was necessary to type "view-source" before the URL in Location to view the javascript original coding for Netscape. The default was the output code of the script. Now the default is the...
5
by: Poster | last post by:
I have a script, its outputs are in HTML. It displays perferctly in a browser, however when I view source, it gives me the JS scripts, but I want to view the HTML output. Is there a way I can view...
6
by: Wescotte | last post by:
I'm writing a tiny php app that will log into our bank of america account and retrieve a file containing a list of checks that cleared the previous day. The problem I'm running into is when I...
5
by: Brad | last post by:
I created a base page class which sets a response filter and the filter injects additional html into the response output stream. The filter works fine and everything works as expected except for...
3
by: Barbara Alderton | last post by:
I recently wrote an ASP.NET app that used user controls. I produced a printer-friendly output form. One requirement was a pagebreak between one part of the form and another. I had no problem...
6
by: Tarren | last post by:
Hi: I have an aspx page that takes a dataset, makes the datagrid, and displays it. The new thing I have to do is take this same output and send it as an email. Is there an easy way to do...
1
by: Andrew | last post by:
I'm adding this as it to me a while to figure out all the pieces to be able to do this without using Microsoft.Office.Interop which caused me problems on the web-server. Streaming is the easy...
0
by: IKdev | last post by:
Hi all, I have win2003 server and NET 1.1 framework. Created simple ASP .NET app with one page that has button and a label. When trying to run got the CS0016 error (see below). My temp env....
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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,...

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.