473,657 Members | 2,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving a dynamic page

Situation: I have a page, built using document.write( ). When I hit
'save as', IE goes and saves the contents of 'about:blank' to that
file, rather than saving the HTML it's displaying in the window. Does
anyone know how to get around this?

Jul 23 '05 #1
3 1605
Jc
James wrote:
Situation: I have a page, built using document.write( ). When I hit
'save as', IE goes and saves the contents of 'about:blank' to that
file, rather than saving the HTML it's displaying in the window. Does
anyone know how to get around this?


You could generate the page server-side. If you're just trying to look
at what the completed output looks like you could
alert(document. body.innerHTML) ; or dump it into a textarea for debug
purposes.

Jul 23 '05 #2
Thanks, but I need to enable users to save the output to a file, and
can't do this server-side. It seems the workaround is to tell users to
select 'HTML only' rather than 'whole page' when saving from IE, which
makes IE save the actual page it has rather than going back to the URL
it thinks the page is from.

Jul 23 '05 #3
Use the MS Script Editor included free with MS Office 2002 and above,
for debugging Internet Explorer (IE).

This subject is of great interest to many JS developers, as there is no
obvious, low cost way to do sophisticated debugging in
IE6 other than to use the debugger described below, which is horribly
documented otherwise. I feel debugging is an important aspect of
projecting the useability of the language and needs to be made more
clear for new users.
Jeff Papineau
yo**@mandala.co m
<FAQENTRY>

This is a page that describes how to install and use the MS Script
Editor to debug Javascript in Internet Explorer ( IE ). It has a
powerful debugger built into it that works really well for developers
supporting IE5+. This debugger/editor included with most versions of
Microsoft Office.

http://www.mandala.com/javascript/debug_javascript.html

..NET programmers may have better tools (VStudio) but this comes in
really handy for anyone developing with JSP and PHP and other dynamic
scripting languages which embed javascript, as well as any HTML page
using Javascript in Internet Explorer that needs a (almost) free
debugging environment.

</FAQENTRY>
James wrote:
Situation: I have a page, built using document.write( ). When I hit
'save as', IE goes and saves the contents of 'about:blank' to that
file, rather than saving the HTML it's displaying in the window. Does
anyone know how to get around this?


Jul 23 '05 #4

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

Similar topics

7
4681
by: Giulio Cespuglio | last post by:
Hi there, I would like to save to disk a picture contained in a webpage. Unfortunately the image is dynamic, so the url is actually a query which looks like http://adfarm.mediaplex.com/ad/bn/2397-11787-1843-5?mpt=1068644406357385 rather than the standard
1
1232
by: Roger Withnell | last post by:
My website has a dynamic navigation bar which the administrators of the site can design. It's structure is held in an SQL database. It is displayed on every page of the website. For a browser, the NavBar has only two structures, one when he or she is not logged on or logged on. An administrator can change its structure at any time, however, which is recorded in the database. One design approach is to build the NavBar for every page...
3
1723
by: Clay Black | last post by:
I need to find a way to save an HTML page to the IIS server. What I need is to have a button that once it is clicked the current page being displayed is saved to a location on the local IIS server. I know there are ways to go and get a page, but this one would be dynamic and wouldn't be saved so I would need to save it while it is still active or have it forwarded to an asp.net page that will take the html code and save it to a file. TIA...
4
2694
by: spx27 | last post by:
Does anyone know the best way to handle passing a dynamic menu generated from a login from one asp.net page to another. Would it be better to recreate the menu on each page? Save the menu as a string into a session variable upon login? Any other way to do this I may be missing? This menu is part of an intranet. The user logs in, checks SQL database for folder permissions, then scans web directories for all folders which match permissions...
3
1417
by: jad101 | last post by:
I have an asp.net web page that: 1. Shows a message 2. Posts back (using javascript) 3. Reads contents of a file 4. response.write the contents of the file to the browser My issue is this: If a user hits this page and decides to save the page for offline browsing, they are not saving the output of the response.write, but instead the html that shows the message and calls
2
2356
by: Mitesh | last post by:
I have an HTML page with references to PHP variables. This HTML is included from another PHP page. How can I save the HTML page dynamically i.e. when all the PHP variables are written into the HTML page. Thanx in Advance
2
4004
by: paulcis | last post by:
I am trying to produce a dynamic form from a database with unknown amount of records. I need to read the values and create a new textbox for each. I need to create the textboxes at page_init stage as indicated by microsoft. But I can't seem to save the number of controls in a viewstate variable or a session variable when creating them in page_init . see code below
1
1837
by: empiresolutions | last post by:
I have a page thats sole function is to generate a dynamic image. When the image is loaded on screen, the only code within the source code body is <img alt="my alt tag" src="http://www.my-site.com/get.php?image_id=1" /> When i right click on the image and try a "save as.." the suggested file name is *get.php.jpg*. So good so far. What i want to do is load this page in the buffer or cache, then rename and save the generated image to a...
1
1692
by: WebCM | last post by:
We can do it in different ways. Configuration data are sent by POST. Some of them should be parsed before saving to file. Perhaps, I will use var_export(). However, how to do it best? 1. Without a class / function. Fields names have no prefix and are equal to $cfg array's indexes. <input name="option_name" /> In every file of options form (e.g. main options, content options, e-
0
8395
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
8826
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...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4155
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...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
1615
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.