Wrox Programmer Forums
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 8th, 2005, 07:45 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default change bgColor

Code:
<script language="javascript">

function HideNPrint() {

PrintMe.style.visibility = "hidden";
print();
PrintMe.style.visibility = "visible";
}
</script>
<body bgcolor="#ececec"> 

<input type="button" name="Print Breakdown" id="print_breakdown" 
value="Print Breakdown" onClick="HideNPrint();" onmouseover="style.cursor='hand'">
is there any way to change the body bgcolor from #ECECEC to #FFFFFF when this button is clicked?


www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
www.piccosmini.co.uk.tt
www.morton.uk.tt
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old July 9th, 2005, 07:29 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

for your question take a look at http://www.google.co.uk/search?q=jav...en-US:official. Also, it may be worth looking a little closer at the CSS for your requirements as the hide/show on printing could also be handled by MEDIA attribute of a CSS group and set it to PRINT see http://webdesign.about.com/cs/css/a/aa042103a.htm





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ajax change textbox bgcolor after Criteria met mkthompson Ajax 1 July 28th, 2008 08:56 AM
Linking body, bgcolor"<%%>" to database brettdalldorf General .NET 7 June 17th, 2005 07:55 AM
How to setup bgColor? liorlankri ASP.NET 1.x and 2.0 Application Design 1 November 11th, 2004 09:45 AM
onClick change bgcolor of entire row Pallav Javascript How-To 2 October 21st, 2004 12:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.