Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using javascript to change elements in particular media

Status
Not open for further replies.

mgriffith

MIS
Jul 3, 2001
177
US
quick question...
anyone know how i can use javascript (in ie5+) to change the display attribute of an object only for a certain media

ex (not really working but idea)

-----------
document.getelementbyid("table1").style.print_media.display="inline";
-----------

my problem is if i change the style without specifying the media, it's a global change and that's bad for the app i'm working on....my temporary workaround is to use visibility through my javascripts and display in my media specifications (i never want to print "table1", but i need to be able to toggle its display from "none" to "inline" on the screen)

the problem with that workaround is that the visibility leaves a blank placeholder there that i don't want (i guess i could toggle height and width to 0px..hmmm i'll do that for now)

any ideas?

thanks mike griffith
----------------------------
mgriffith@lauren.com
mdg12@po.cwru.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top