I have a similar problem I'm trying to solve. I have a page with a
list of items. when one clicks an item in the list a pop-up window
appears with more info about that item. the pop-up is using layers and
'visible'/'hidden' to display the additional info. the add. info is
located on the same page as the list but is hidden until the user
clicks the link. the add. info is contained in <span> tags with an
"id" for each different item.
when a visitor prints the page while the extra info is showing they
get the new info overprinted on top of the original list.
what i think i should be doing is providing a "print this" javascript
link inside my <span> tags that somehow references the "id" of that
span (thisid?), but I don't know how to do this.
the idea is that using the normal print method will give the user a
printout of the orginal list and using the "print this" js link will
just print the additional info box. does this make sense? TIA
ba**@nijlen.com (Bart Van der Donck) wrote in message news:<b5**************************@posting.google. com>...
Anshul Gupta wrote:
Is there a way i can just print a designated area out of the whole
asp(or html) page using javascript or vbscript.
i want to mark out the beginning and the end on the page and create a
link just to print out that section.
Please help me if there is any way to do this.
I think you are looking for a CSS profile:
<style media="print">
.onlyscreen
{
display: none;
}
</style>
AFAIK this works in IE5.0+.
Then you just assign the class, eg:
<p class="onlyscreen">This text displays on screen but will not be printed</p>
I also use this (IE5.0+?) trick to dynamically change class names:
<p onClick="thisid.className='otherclass';" id="thisid">text here</p>
Hope this helps
Bart