Hi,
I tried to print a document with the window.print method, but with netscape
7, i always get the error:"the page was replaced while you was trying to
print. Try again". I see "mydoc.htm" and the window of the printer appearing
on screen, but when clicking on 'ok' i get the error and 3 sec later,
'mydoc.htm' disappears.
With IE 6, no problem.
See the code: (even with setTimeout 20.000 it doesn't work)
yy="toolbar=no "
function printdoc()
{
opl=window.open ("mydoc.htm","" ,yy)
opl.print()
setTimeout("opl .close()",3000)
}
document.getEle mentById("prt") .onclick=printd oc
Thanks for any help 2 2724
Carl wrote: Hi,
I tried to print a document with the window.print method, but with netscape 7, i always get the error:"the page was replaced while you was trying to print. Try again". I see "mydoc.htm" and the window of the printer appearing on screen, but when clicking on 'ok' i get the error and 3 sec later, 'mydoc.htm' disappears.
With IE 6, no problem.
See the code: (even with setTimeout 20.000 it doesn't work) yy="toolbar=no " function printdoc() { opl=window.open ("mydoc.htm","" ,yy) opl.print() setTimeout("opl .close()",3000) } document.getEle mentById("prt") .onclick=printd oc
Thanks for any help
You can't print a window that contains no document, which is what is happening.
The loading of "mydoc.htm" is not instantaneous, it takes time, but you are
giving it no time to load before calling window.print().
IE may wait for the document to load before involving print() on it, or you
could just be lucky.
At any rate, you have to wait for the document in the new window to finish
loading before you can call print() on it. The simplest and best way to do this
is to add <body onload="window. print();"> to "mydoc.htm" .
--
| Grant Wagner <gw*****@agrico reunited.com>
* Client-side Javascript and Netscape 4 DOM Reference available at:
* http://devedge.netscape.com/library/...ce/frames.html
* Internet Explorer DOM Reference available at:
* http://msdn.microsoft.com/workshop/a...ence_entry.asp
* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
thanks
"Grant Wagner" <gw*****@agrico reunited.com> wrote in message
news:3F******** *******@agricor eunited.com... Carl wrote:
Hi,
I tried to print a document with the window.print method, but with
netscape 7, i always get the error:"the page was replaced while you was trying to print. Try again". I see "mydoc.htm" and the window of the printer
appearing on screen, but when clicking on 'ok' i get the error and 3 sec later, 'mydoc.htm' disappears.
With IE 6, no problem.
See the code: (even with setTimeout 20.000 it doesn't work) yy="toolbar=no " function printdoc() { opl=window.open ("mydoc.htm","" ,yy) opl.print() setTimeout("opl .close()",3000) } document.getEle mentById("prt") .onclick=printd oc
Thanks for any help You can't print a window that contains no document, which is what is
happening. The loading of "mydoc.htm" is not instantaneous, it takes time, but you
are giving it no time to load before calling window.print().
IE may wait for the document to load before involving print() on it, or
you could just be lucky.
At any rate, you have to wait for the document in the new window to finish loading before you can call print() on it. The simplest and best way to do
this is to add <body onload="window. print();"> to "mydoc.htm" .
-- | Grant Wagner <gw*****@agrico reunited.com>
* Client-side Javascript and Netscape 4 DOM Reference available at: * http://devedge.netscape.com/library/...ce/frames.html * Internet Explorer DOM Reference available at: * http://msdn.microsoft.com/workshop/a...ence_entry.asp * Netscape 6/7 DOM Reference available at: * http://www.mozilla.org/docs/dom/domref/ * Tips for upgrading JavaScript for Netscape 7 / Mozilla * http://www.mozilla.org/docs/web-deve...upgrade_2.html
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dave Smithz |
last post by:
Hi,
In summary:
I want to a form to submit information via a HTTP POST, however, when using
Internet Explorer I want to be able to use the back button and all the
information retained. Presently we get a "Page has expired" message. How can
we avoid this?
Full details:
Having searched for postings on how to avoid the "Page has Expired" they are
|
by: Michelle Kinsey-Clinton |
last post by:
Hello,
I am writing an ASP app which is giving me some very frustrating
errors. They appear intermittently, no real pattern to them, and often
go away if you reload, or back up a few pages and start over again.
The first error is logged as a 400 error and says only, "The parameter
is incorrect." It (mostly, but not always) happens upon submitting a
form, and a reload is generally successful in bringing the page up
just fine. I have...
|
by: jrefactors |
last post by:
I have an upload file operation in the web application. UploadForm.jsp
is the form,
and UploadAction.jsp is the form processing. The web server is
Websphere.
//UploadForm.jsp
<FORM NAME="InputForm" ACTION="UploadAction.jsp" METHOD="POST"
enctype=multipart/form-data>
<input type="file" name="fileName">
//etc ...
|
by: VMI |
last post by:
Everytime I open my machine's MSDN and look for a subject, when I
double-click on anything, I get "The page cannot be displayed" .
What's wrong?
|
by: JohnZing |
last post by:
i tried to install asp.net forums
all went ok, but after login i always get
"Object moved to here." in firefox or "The page cannot be displayed" in IE
when i hit refresh, the page loads fine.
the problem occurs only when i try to run the application hosted in my
hosting provider, not in my local IIS server.
any ideas?
| |
by: emon.haider |
last post by:
Hi guys,
I just made a web application using ASP.Net and C#. The application
compiles and works fine from my workstation, but after I uploaded it to
my webserver, I am getting an error of "the page cannot be displayed"
in IE and "the document contains no data" in FireFox.
The error I get is when I try to access page, which is
www.mywebsite.com/addtocart.aspx?ProductID=xx. I know for a fact that
addtocart.aspx exists but I am still...
|
by: spam1 |
last post by:
Hi all,
I'm not new to ASP.NET but I'm trying to get a simple Hello World page
going on IIS 6.0 on Windows 2003. I'm connecting from the local
machine.
It comes back with the standard "The page cannot be displayed" error
page.
Some points:
|
by: jhaxo |
last post by:
I have a web page that I installed to IIS 6.0 from a web deployment project successfully.
I am trying to deploy the same application to laptops that are running IIS 5.0. I am getting an error "the page cannot be found". My virtual directory is setup correctly (at least in the same manner as per iis 6).
I dont see a tab for web service extentions. I cannot browse from IIS either, I get the same error, even if I browse to an htm file.
...
|
by: Sourabh Raizada |
last post by:
Hi
i'm trying to reload a page using "javascript:history.go(0);". The page consists of some cascading dropdowns implemented using ajax which also invoke gridviews.
Now if i try to reload before the gridview is invoked it works but post that it pops the error "The page cannot be refreshed without sending the information.
Click Retry to send the information again,
or click Cancel to return to the page that you were trying to view".
...
|
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...
|
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,...
| |
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |