Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

w2ksp4.exe, WwwxxXdbf, procmail "FROM_MAILER" patch, Use of assignment to $[ is deprecated at /usr/local/sbin/apxs line 86. , wwwxxx vim, mysql closing table and opening table, 800c5000, setgid operation not permitted, pciehp: acpi_pciehprm on IBM, WWWXXX.DBF

Links

XODOX
Impressum

#1: html javascript print command

Posted on 2008-04-12 03:21:02 by tigeressal

hi,
im new to this group but ill be direct to the point.

im tryin to create a simple webpage that will print the contents of
the webpage to a printer on a client side machine.

i know the command is ' window.print() ' and that i can have it in
the ' onload() ' statement so that the print dialouge appears prior to
printing.

here my question. how do i eliminate the Header and Footer information
that is automatically generated by the webpage?(i.e. the website name
at the top, and the location url at the bottom)

any help appreciated.

regards

rak

Report this message

#2: Re: html javascript print command

Posted on 2008-04-12 04:06:00 by lws4art

tigeressal wrote:
> hi,
> im new to this group but ill be direct to the point.
>
> im tryin to create a simple webpage that will print the contents of
> the webpage to a printer on a client side machine.
>
> i know the command is ' window.print() ' and that i can have it in
> the ' onload() ' statement so that the print dialouge appears prior to
> printing.

I wouldn't recommend it. Folks who browse the web expect to *see* a page
when it loads, if they want to print it they will click print from their
browser. Anyway what if they don't have a printer? Maybe they are view
the page from on of those iPhones...


> here my question. how do i eliminate the Header and Footer information
> that is automatically generated by the webpage?(i.e. the website name
> at the top, and the location url at the bottom)

You cannot, those are user settings on the browser. You cannot script them.


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Report this message

#3: Re: html javascript print command

Posted on 2008-04-12 04:18:46 by PW

"tigeressal" <cdrakz2000@mynow.co.uk> wrote in message
news:d55be8e6-f177-4337-b2d2-e5f0eede7ec4@b64g2000hsa.google groups.com...
> hi,
> im new to this group but ill be direct to the point.
>
> im tryin to create a simple webpage that will print the contents of
> the webpage to a printer on a client side machine.
>
> i know the command is ' window.print() ' and that i can have it in
> the ' onload() ' statement so that the print dialouge appears prior to
> printing.
>
> here my question. how do i eliminate the Header and Footer information
> that is automatically generated by the webpage?(i.e. the website name
> at the top, and the location url at the bottom)
>
> any help appreciated.
>
> regards
>
> rak




First, create a style like this ...
<style type="text/css">
<!--
@media print{.dontprintme{display:none;}}
-->
</style>



Next, whenever you are serving something that you don't want to be printed,
place it in a paragraph like this ...
(this is my print button by the way)
<p class="dontprintme">
<BUTTON TYPE=BUTTON onClick="window.print()"
style="width:250px;height:50px;">&nbsp&nbspPRINT&nbsp&nbsp</BUTTON>
<p>



Now, when you run the page, and you click the button, then everything thats
NOT within a 'dontprintme' paragraph will not be printed.

HTH,
PW

Report this message

#4: Re: html javascript print command

Posted on 2008-04-12 04:34:41 by PW

>
> First, create a style like this ...
> <style type="text/css">
> <!--
> @media print{.dontprintme{display:none;}}
> -->
> </style>
>
>
>
> Next, whenever you are serving something that you don't want to be
> printed, place it in a paragraph like this ...
> (this is my print button by the way)
> <p class="dontprintme">
> <BUTTON TYPE=BUTTON onClick="window.print()"
> style="width:250px;height:50px;">&nbsp&nbspPRINT&nbsp&nbsp</BUTTON>
> <p>
>
>
>
> Now, when you run the page, and you click the button, then everything
> thats NOT within a 'dontprintme' paragraph will not be printed.
>
> HTH,
> PW
>


OOPS, that should have said ...
Now, when you run the page, and you click the button, then everything thats
NOT within a 'dontprintme' paragraph WILL be printed.

Report this message

#5: Re: html javascript print command

Posted on 2008-04-12 04:35:05 by lws4art

PW wrote:
> "tigeressal" <cdrakz2000@mynow.co.uk> wrote in message
> news:d55be8e6-f177-4337-b2d2-e5f0eede7ec4@b64g2000hsa.google groups.com...
>> hi,
>> im new to this group but ill be direct to the point.
>>
>> im tryin to create a simple webpage that will print the contents of
>> the webpage to a printer on a client side machine.
>>
>> i know the command is ' window.print() ' and that i can have it in
>> the ' onload() ' statement so that the print dialouge appears prior to
>> printing.
>>
>> here my question. how do i eliminate the Header and Footer information
>> that is automatically generated by the webpage?(i.e. the website name
>> at the top, and the location url at the bottom)
>>
>> any help appreciated.
>>
>> regards
>>
>> rak
>
>
>
>
> First, create a style like this ...
> <style type="text/css">
> <!--
> @media print{.dontprintme{display:none;}}
> -->
> </style>
>
>
>
> Next, whenever you are serving something that you don't want to be printed,
> place it in a paragraph like this ...
> (this is my print button by the way)
> <p class="dontprintme">
> <BUTTON TYPE=BUTTON onClick="window.print()"
> style="width:250px;height:50px;">&nbsp&nbspPRINT&nbsp&nbsp</BUTTON>
> <p>

Ah, but what OP want to excluded is not part of his web page that he
composed but the URL and date and page numbers that is added by the
browser by default. This is a user setting on the browser and is not
controllable by the web author...at least with HTML and CSS


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Report this message

#6: Re: html javascript print command

Posted on 2008-04-12 18:55:22 by Sid Ismail

On Fri, 11 Apr 2008 22:35:05 -0400, "Jonathan N. Little"
<lws4art@central.net> wrote:

: > <!--
: > @media print{.dontprintme{display:none;}}
: > -->
: > </style>
: >
: >
: >
: > Next, whenever you are serving something that you don't want to be printed,
: > place it in a paragraph like this ...
: > (this is my print button by the way)
: > <p class="dontprintme">
: > <BUTTON TYPE=BUTTON onClick="window.print()"
: > style="width:250px;height:50px;">&nbsp&nbspPRINT&nbsp&nbsp</BUTTON>
: > <p>
:
: Ah, but what OP want to excluded is not part of his web page that he
: composed but the URL and date and page numbers that is added by the
: browser by default. This is a user setting on the browser and is not
: controllable by the web author...at least with HTML and CSS


The easiest way for the OP to achieve this would be to PDF it.

Sid

Report this message

#7: Re: html javascript print command

Posted on 2008-04-12 22:41:57 by tigeressal

On Apr 12, 3:35=A0am, "Jonathan N. Little" <lws4...@central.net> wrote:
> PW wrote:
> > "tigeressal" <cdrakz@nw.co.uk> wrote in message
> >news:d55be8e6-f177-4337-b2d2-e5f0eede7ec4@b64g2000hsa.googl egroups.com...=


snipped

> >> rak
>
> > First, create a style like this ...
> > <style type=3D"text/css">

snipped

> > style=3D"width:250px;height:50px;">&nbsp&nbspPRINT&nbsp&nbsp</BUTTON>
> > <p>
>
> Ah, but what OP want to excluded is not part of his web page that he
> composed but the URL and date and page numbers that is added by the
> browser by default. This is a user setting on the browser and is not
> controllable by the web author...at least with HTML and CSS
>
> --
> Take care,
>
> Jonathan
> -------------------

Hi thanks for the reply, You said its not possible with HTML or CSS.
Is there a way to do it by other langauges (i.e. specifically PHP)

Just to let people know, the webpage in question will NOT be on the
internet but instead on a local nework.
The printer in question is connected to a client side computer by
usb.
AND the end user WILL want to print the page as it will be part of a
particular process.

thanks

rak

Report this message

#8: Re: html javascript print command

Posted on 2008-04-12 23:12:50 by unknown

Post removed (X-No-Archive: yes)

Report this message

#9: Re: html javascript print command

Posted on 2008-04-12 23:33:25 by Andy Dingley

On 12 Apr, 22:12, Ed Jay <ed...@aes-intl.com> wrote:

> It is impossible to do via code. It's hard coded into the browser.

It's not hard-coded into the browser, it's configurable. Some browsers
may have a programming interface that exposes this, and lets you
control it. This is likely to be very browser-specific. IE certainly
does have this, although it requires COM (ad thus ActiveX). If you use
MeadCo's ScriptX control on your page, it's pretty easy.

Report this message

#10: Re: html javascript print command

Posted on 2008-04-13 00:59:37 by lws4art

Andy Dingley wrote:
> On 12 Apr, 22:12, Ed Jay <ed...@aes-intl.com> wrote:
>
>> It is impossible to do via code. It's hard coded into the browser.
>
> It's not hard-coded into the browser, it's configurable. Some browsers
> may have a programming interface that exposes this, and lets you
> control it. This is likely to be very browser-specific. IE certainly
> does have this, although it requires COM (ad thus ActiveX). If you use
> MeadCo's ScriptX control on your page, it's pretty easy.

Ol' wild and woolly IE! Same business lets to do all kinds of damage.
But now with MS's attempt at securing IE won't you get a zillion warning
dialogs when you invoke such ActiveX? It would hardly be a feasible
solution. Generate PDF would be the way...some freebee PHP packages out
there, fpdf comes to mind.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Report this message

#11: Re: html javascript print command

Posted on 2008-04-13 12:17:26 by Andy Dingley

On 12 Apr, 23:59, "Jonathan N. Little" <lws4...@central.net> wrote:

> But now with MS's attempt at securing IE won't you get a zillion warning
> dialogs when you invoke such ActiveX? It would hardly be a feasible
> solution.

No, you can get away with just setting trust up once. As an app that
_needs_ to control print sizes is probably something that the user has
a non-trivial relationship with, this might be enough.

Report this message

#12: Re: html javascript print command

Posted on 2008-04-13 13:12:23 by TravisNewbury

On Apr 12, 5:12 pm, Ed Jay <ed...@aes-intl.com> wrote:
> It is impossible to do via code...

Ed, are your comment so unimportant that you don't think anyone will
want to read them after a week, or are you just selfish?

Report this message

#13: Re: html javascript print command

Posted on 2008-04-13 16:50:54 by unknown

Post removed (X-No-Archive: yes)

Report this message

#14: Re: html javascript print command

Posted on 2008-04-13 17:00:46 by lws4art

Ed Jay wrote:
> Travis Newbury scribed:
>
>> On Apr 12, 5:12 pm, Ed Jay <ed...@aes-intl.com> wrote:
>>> It is impossible to do via code...
>> Ed, are your comment so unimportant that you don't think anyone will
>> want to read them after a week, or are you just selfish?
>
> What are you talking about?

Obscure? Yep! But this is what he was referring to:

X-No-Archive: yes

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Report this message

#15: Re: html javascript print command

Posted on 2008-04-13 17:29:04 by unknown

Post removed (X-No-Archive: yes)

Report this message

#16: Re: html javascript print command

Posted on 2008-04-13 20:18:19 by Neredbojias

On 13 Apr 2008, Ed Jay <edMbj@aes-intl.com> wrote:

> Jonathan N. Little scribed:

>>>> Ed, are your comment so unimportant that you don't think anyone will
>>>> want to read them after a week, or are you just selfish?
>>>
>>> What are you talking about?
>>
>>Obscure? Yep! But this is what he was referring to:
>>
>>X-No-Archive: yes
>
> Yes...as soon as I hit 'send,' I realized what the issue was.

....And? ...And???

Do _not_ leave us in suspense! Either confess your villainous perfidy in
the most abject, obsequious manner you can assume or draw the line and
defend it with whatever gumption you can muster following such a felonious
faux pas.

--
Neredbojias
http://www.neredbojias.com/
Great sights and sounds

Report this message

#17: Re: html javascript print command

Posted on 2008-04-13 20:19:53 by Neredbojias

On 13 Apr 2008, Ed Jay <edMbj@aes-intl.com> wrote:

> Travis Newbury scribed:

>>Ed, are your comment so unimportant that you don't think anyone will
>>want to read them after a week, or are you just selfish?
>
> What are you talking about?

Well, his name is Jonathan "Little" so maybe he's just making "small"
talk.

--
Neredbojias
http://www.neredbojias.com/
Great sights and sounds

Report this message

#18: Re: html javascript print command

Posted on 2008-04-13 20:36:05 by lws4art

Neredbojias wrote:
> On 13 Apr 2008, Ed Jay <edMbj@aes-intl.com> wrote:
>
>> Travis Newbury scribed:
>
>>> Ed, are your comment so unimportant that you don't think anyone will
>>> want to read them after a week, or are you just selfish?
>> What are you talking about?
>
> Well, his name is Jonathan "Little" so maybe he's just making "small"
> talk.
>

Hey, it wasn't me being the protocol-nazi I was just explaining what
Travis meant by is remark.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Report this message

#19: Re: html javascript print command

Posted on 2008-04-13 22:38:41 by unknown

Post removed (X-No-Archive: yes)

Report this message

#20: Re: html javascript print command

Posted on 2008-04-13 23:42:31 by lws4art

Ed Jay wrote:

> Two answers to the questions. I am selfish, and I don't know why No
> X-archive was checked. This post should be archived forever; however, most
> of my posts have already found their place in the anals of history. ;-)

Nope, your X-No-Archive is still set.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Report this message

#21: Re: html javascript print command

Posted on 2008-04-14 00:34:42 by Ed Jay

Jonathan N. Little scribed:

>Ed Jay wrote:
>
>> Two answers to the questions. I am selfish, and I don't know why No
>> X-archive was checked. This post should be archived forever; however, most
>> of my posts have already found their place in the anals of history. ;-)
>
>Nope, your X-No-Archive is still set.

Thanks. It's not any longer.
--
Ed Jay (remove 'M' to respond by email)

Report this message

#22: Re: html javascript print command

Posted on 2008-04-14 01:50:32 by Neredbojias

On 13 Apr 2008, Ed Jay <edMbj@aes-intl.com> wrote:

>>>>X-No-Archive: yes
>>>
>>> Yes...as soon as I hit 'send,' I realized what the issue was.
>>
>>...And? ...And???
>>
>>Do _not_ leave us in suspense! Either confess your villainous perfidy
>>in the most abject, obsequious manner you can assume or draw the line
>>and defend it with whatever gumption you can muster following such a
>>felonious faux pas.
>
> Didn't anyone ever tell you that when pondering your esoteric
> cogitations to beware of employing ineffectual ponderosities? I
> thought not. :-)))

I think Jukka mentioned it once but then he does tend to go overboard on
the irascible irrelevancies from time to time.

> Two answers to the questions. I am selfish, and I don't know why No
> X-archive was checked. This post should be archived forever; however,
> most of my posts have already found their place in the anals of
> history. ;-)

Well that is wonderful in a mundane sort of way. I'm sure Mr. Little will
be miniaturely mollified at this microcosm of news and its lesser impact
upon the greater world. Personally, I don't give 2 bandicots in a
billabong one way or t'other.

--
Neredbojias
http://www.neredbojias.com/
Great sights and sounds

Report this message

#23: Re: html javascript print command

Posted on 2008-04-14 01:53:31 by Neredbojias

On 13 Apr 2008, "Jonathan N. Little" <lws4art@central.net> wrote:

>>>> Ed, are your comment so unimportant that you don't think anyone will
>>>> want to read them after a week, or are you just selfish?
>>> What are you talking about?
>>
>> Well, his name is Jonathan "Little" so maybe he's just making "small"
>> talk.
>>
>
> Hey, it wasn't me being the protocol-nazi I was just explaining what
> Travis meant by is remark.

Ah, I should have known. Whenever something goes awry, Travis is usually
involved somehow or other. Actually, I think his brain may have become
addled by perusing so much Flash. That don't make him a bad guy, of
course, but such a waste of biomass...

--
Neredbojias
http://www.neredbojias.com/
Great sights and sounds

Report this message

#24: Re: html javascript print command

Posted on 2008-04-14 02:27:34 by TravisNewbury

On Apr 13, 7:53 pm, Neredbojias <me@http://www.neredbojias.com/_eml/
fliam.php> wrote:
> Actually, I think his brain may have become
> addled by perusing so much Flash. That don't make him a bad guy...

Or does it.....

Report this message