Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2003
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Changing IE Headers and Footers in Javascript?

    If you want to stop the header and footer from being displayed when you print something out in Internet Explorer you can simply go into the Page Setup and remove the "&w&bPage &p of &P" for the header and "&u&b&d" for the footer, which show the page numbers and URL.

    However, I am developing a web application for a number of users and they will not want to have this URL and the page number displayed. Instead of going around to each PC and change the page setup settings in their internet explorer - is it possible to modify the header and footer values with JavaScript code in the web page that the user will want to print. And if so how is this achieved. If there is a previous discussion on this please point me to the thread.

    Thanks.

  • #2
    New Coder
    Join Date
    Aug 2004
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Starlight,

    Straight answer : No you cannot change print settings using javascript.

    Indetail:
    Remember that javascript can only do anything inside your webpage. You cannot access clients resources like page setup or, desktop icons, or control panel and not even menus of your own browsing window. The only options you can access using javascript are as below.

    1.Location bar to naviagate to some other page.
    2.Back and forward buttons using code like history.back();
    3.Window events like onload and onunload.
    4.Anyevents that occur inside the browser document window. Like keypress, mouseclick

    I think that completes the list. If somebody can add a few other it will be helpful to newbies.

    Have a nice day

    Afru.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •