Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

ASP "print button"

  • 26-09-2007 3:39pm
    #1
    Registered Users, Registered Users 2 Posts: 868 ✭✭✭


    Hi, I'm an ASP and CSS newbie but I'm getting by.

    I have a page that contains an ASP:table element to display some data.

    Is it feasible to put a button on the page above the table that will print the table only - not the whole page.

    Has anyone any implementation suggestions?

    Thanks folks,
    Brianmc


Comments

  • Registered Users, Registered Users 2 Posts: 1,466 ✭✭✭Smoggy


    you could :

    Store the data you want printed in a div, have a print button that then opens a new window and copies the div into it and call the js window.print();


  • Registered Users, Registered Users 2 Posts: 706 ✭✭✭DJB


    you could use a print.css file to hide all elements on the page accept for the table you want to use. Do a bit of reading on "print css". You embed an extra file for print use only using:

    <link rel="stylesheet" type="text/css" media="print" href="print.css" />

    Read more at:

    http://www.alistapart.com/articles/goingtoprint/

    Rgds, Dave


  • Users Awaiting Email Confirmation Posts: 351 ✭✭ron_darrell


    Would agree with DJ, much easier (and better as users can turn off javascript on their browser but cannot really turn off CSS) to use CSS. Have a look at display:block; and display:none;

    -RD


  • Moderators, Politics Moderators Posts: 40,296 Mod ✭✭✭✭Seth Brundle


    ...users can turn off javascript on their browser but cannot really turn off CSS...
    I have my Firefox web developer toolbar which does this. :p


  • Registered Users, Registered Users 2 Posts: 706 ✭✭✭DJB


    kbannon wrote:
    I have my Firefox web developer toolbar which does this. :p
    Yeah, me too, but how often do you turn off css while browsing? You only really do that during testing... well, I do anyway! :D


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 868 ✭✭✭brianmc


    Thanks folks,

    I used a combination of ideas. I'd made the layout of the site using tables (it's a long time since I've had to do anything webby) so my print button pulls up a new page with a couple of navigation bits and pieces along with the data. The navigation bits are hidden for printing by CSS.

    It worked out well - I like to think.


Advertisement