I'm a newbie to JavaScript so be gentle.
You know that funky IE margin issue that causes the right side of the
page to get cut off when the user prints the html document? http://www.post-gazette.com/interact/20000120radin.asp
Well… I'd like to warn/help the IE users of the issue before they
print page.
I want to combine a popup message with
onClick="javasc ript:window.pri nt
Here's what I have so far.
<script language="JavaS cript">
<!--
<a href="#" onClick="MM_pop upMsg('Before You print, I'd like you to
read about the IE margin problem')">
else if (window.print) {
document.write( '<a href="#" onClick="javasc ript:window.pri nt()">' +
'<img src="assets/frontpage_print _button.gif" width="146" height="29"
border="0">' + '</a>');
}
// -->
</script>
What do you think?
I'm guessing the "else if" is not the solution.
Thanks in advance for the help.
PS. The pages that I've built are 760px Ice and the function for the
popup message is..
function MM_popupMsg(msg ) { //v1.0
alert(msg);
} 4 3244
Fred wrote: I'm a newbie to JavaScript so be gentle.
You know that funky IE margin issue that causes the right side of the page to get cut off when the user prints the html document? http://www.post-gazette.com/interact/20000120radin.asp
Never heard of it but I rarely print in IE. Well… I'd like to warn/help the IE users of the issue before they print page.
And how do you propose to determing they are using IE?
I want to combine a popup message with onClick="javasc ript:window.pri nt
Oh geez.
Here's what I have so far.
Throw it away. <script language="JavaS cript"> <!-- <a href="#" onClick="MM_pop upMsg('Before You print, I'd like you to read about the IE margin problem')">
Thats a syntax error, did you test it before posting?
else if (window.print) { document.write( '<a href="#" onClick="javasc ript:window.pri nt()">' + '<img src="assets/frontpage_print _button.gif" width="146" height="29" border="0">' + '</a>');
Frontpage and DreamWeaver mixed? I guess it really *can* get worse than
FP or DW
} // -->
</script>
What do you think?
I think its junk.
I'm guessing the "else if" is not the solution.
No, its not the solution. The solution, if its that important to you, is
to place a link on the page such as:
<a href="http://www.post-gazette.com/interact/20000120radin.a sp">IE
Print Problem</a>
Thanks in advance for the help.
Umm, yeah, ok.
PS. The pages that I've built are 760px Ice and the function for the popup message is..
What is "760px Ice"? I bet it would look nice in my preferred size
browser window of 600px wide. Or even better if I maximize it at 2048px
wide. http://allmyfaqs.com/faq.pl?AnySizeDesign
function MM_popupMsg(msg ) { //v1.0 alert(msg); }
There's that DreamWeaver code I mentioned. Sheesh, its getting worse.
P.S. Anybody that passes an argument to a function to simply alert a
message needs to learn the language first :-x
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
My goal is post a print button on every page of the site that displays
a message before the document prints.
-They click the print button
-A message appears and they read it
-They click ok and they get the print prompt.
That's it, nothing more nothing less.
Belive me, I know the code I posted sucks.
I posted it with hopes that some one would post how the code should
really look.
I think it sucks to ask for help and not provide some code as an
example. Even if the code sucks.
On Thu, 17 Feb 2005 21:11:23 -0500, Randy Webb
<Hi************ @aol.com> wrote: Fred wrote: I'm a newbie to JavaScript so be gentle.
You know that funky IE margin issue that causes the right side of the page to get cut off when the user prints the html document? http://www.post-gazette.com/interact/20000120radin.asp
Never heard of it but I rarely print in IE.
Well… I'd like to warn/help the IE users of the issue before they print page.
And how do you propose to determing they are using IE?
I want to combine a popup message with onClick="javasc ript:window.pri nt
Oh geez.
Here's what I have so far.
Throw it away.
<script language="JavaS cript"> <!-- <a href="#" onClick="MM_pop upMsg('Before You print, I'd like you to read about the IE margin problem')">
Thats a syntax error, did you test it before posting?
else if (window.print) { document.write( '<a href="#" onClick="javasc ript:window.pri nt()">' + '<img src="assets/frontpage_print _button.gif" width="146" height="29" border="0">' + '</a>');
Frontpage and DreamWeaver mixed? I guess it really *can* get worse than FP or DW
} // -->
</script>
What do you think?
I think its junk.
I'm guessing the "else if" is not the solution.
No, its not the solution. The solution, if its that important to you, is to place a link on the page such as:
<a href="http://www.post-gazette.com/interact/20000120radin.a sp">IE Print Problem</a>
Thanks in advance for the help.
Umm, yeah, ok.
PS. The pages that I've built are 760px Ice and the function for the popup message is..
What is "760px Ice"? I bet it would look nice in my preferred size browser window of 600px wide. Or even better if I maximize it at 2048px wide.
http://allmyfaqs.com/faq.pl?AnySizeDesign
function MM_popupMsg(msg ) { //v1.0 alert(msg); }
There's that DreamWeaver code I mentioned. Sheesh, its getting worse.
P.S. Anybody that passes an argument to a function to simply alert a message needs to learn the language first :-x
Fred wrote: My goal is post a print button on every page of the site that
displays a message before the document prints.
-They click the print button -A message appears and they read it -They click ok and they get the print prompt.
Some sites like yahoo maps have a printer friendly version of the page.
Why don't you look at yahoo maps. Instead of refering them to a web
page that doesn't provide a lot of help, I suggest creating a printer
friendly page.
Robert This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: None |
last post by:
Hello, I am a total newbie to PHP and programming in general. I am playing
around with a PHP / MySQL shopping cart script which I found at
http://www.macromedia.com/devnet/mx/dreamweaver/articles/php_cart.html. When
I try to start a session or create a cookie, I get the following errors.
Warning: Cannot send session cache limiter - headers already sent (output
started at /wrapper_head2.php:27) in /cart.php on line 13
Warning: Cannot...
|
by: Zip Code |
last post by:
"The large print giveth, and the small print taketh away.", so said Tom
Waites in his classic rap, "Step Right Up", a paean about come ons and rip
offs.
Now, we have all explored the fact that the Gate$ Foundation is no more than
a front to promote and try to claw onto marketshare for windos by lining
the pockets of Third World government bureaucrats all in the name of
helping "children with AIDS".
But, let's pretend that we've been...
|
by: Andrew Thompson |
last post by:
It seems most people get there JS off web sites, which is
entirely logical. But it is also a great pity since most
of that code is of such poor quality.
I was looking through the JS FAQ for any question that
identifies the warning signs to look out for, the things
that most easily and clearly identify the author of code
as something less than a master of the art.
I did not find an FAQ that answered it, but I think the FAQ
|
by: Spartanicus |
last post by:
The document at http://homepage.ntlworld.com/spartanicus/custom_dtd.htm
uses a custom DTD, the w3c validator validates it but with this warning:
"Unknown Parse Mode!
The MIME Media Type (text/html) for this document is used to serve both
SGML and XML based documents, and it is not possible to disambiguate it
based on the DOCTYPE Declaration in your document. Parsing will continue
in SGML mode."...
|
by: B. Williams |
last post by:
I am receiving two warnings in my code and can't figure out why. Will
someone look at this and tell me what I have done wrong?
#include <iostream>
using std::cout;
#include <string>
using std::string;
| |
by: U S Contractors Offering Service A Non-profit |
last post by:
Brilliant technology helping those most in need Inbox
Reply
U S Contractors Offering Service A Non-profit
show details
10:37 pm (1 hour ago)
Brilliant technology helping those most in need Inbox
Reply
from Craig Somerford <uscos@2barter.net>
hide details 10:25 pm
(3 minutes ago)
|
by: lucavilla |
last post by:
If you go to http://europe.nokia.com/A4305060, fill the "Enter your
product code:" field with the value "0523183" and press "Go" (the
ending page URL varies because there's a variable session-ID in the
URL-link associated to "Go") you will obtain this string:
"Version: RM43_V1.10.030"
Is it possible to have a string.php page that just display this string?
how can I do it?
|
by: geevaa |
last post by:
Hi Group,
The page 167 of book Learning PHP5 by David Sklar says that
setcookie() and session_start() must be added before any output.
I tried to use that functions at last line but no warning!.
The warning which i got 1 month back is not issued now.
------------------------------------------------------------------
The following is my PHP program
<?php
function Intelli()
|
by: nasse |
last post by:
I am getting the following error msg whenever I try to login. I tried to turn my output_buffering = On in my php.ini but is not working for me. Would you please help me:
Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub ........login\include\header.php:9) in C:\Inetpub\vhosts\.....\httpdocs\login\login.php on line 23
And here is the content of the header.php page which is included in all my...
|
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: 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...
|
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,...
|
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...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| |