all-BI Business Intelligence Solutions: Munich (München, Germany and New York City USA
inSight / dynaSight consulting
search all-BI.com

back to all-BI Business Intelligence Solutions home pageall-BI Business Intelligence Solutions strategic services in Munich (München) Germany and New York City , USAColdFusion, Crytsal Reports, DB2, dynaSight, JavaScript, OLAP, Oracle, SQL ServColdFusion, Crytsal Reports, DB2, dynaSight, JavaScript, OLAP, Oracle, SQL Server and  much more!all-BI Business Intelligence Solutions in Munich (München) and New Yorkdeutsche Version der Hompage
Oracle, dynaSight (arcplan), JavaScript, Crystal Reports, ColdFusion and more
arcplan dynaSight
arcplan dynaSight knowledge
JavaScript
JavaScript knowledge and  tips
take a small break...
Auch deutsch ist unsere Muttersprache!

Notre langue maternelle est aussi le français!

Nuestra lengua maternal es tambien el español!

Business Intelligence Industry News:

Mar. 01, '08
SAP BW and Microsoft Analysis Services (OLAP) with one front-end: Panorama NovaView.
(Panorama)


 
JavaScript

javascript

How to modify a Web Page Background Colour using only a Mouse Click

The background color of a web page is a question of taste, like most style characteristics. If you are looking for a way to make the background color of your pages flexible just follow the instructions below.

In particular if your pages are very colorful, you may want to let the user select some of the background colors, especially if you are using advanced printing techniques. Fortunately a base flexibility is relatively easy to achive with less than 10 lines of Javascript code. The following needs to go in the <head> section

<script language = "Javascript">
function pageBackground(bkgColor) {
document.bgColor=bkgColor
}
</script>

In order to activate the color change there are many ways of providing your users with an interface to the above functionality. Here we go through the simple route of using a link:

<a href="#" onClick=pageBackground('yellow')>Yellow</a><br / >
<a href="#" onClick=pageBackground('lightblue')>Blue</a><br / >

Below you can observe them embedded into the current page for you to try out :

Yellow

Blue

The anchor (#) makes sure that no new page is opened by the link. As an exercise, you might want to provide an interface so that the background color changes on modifying a pop-up menu with all kinds of different background color options.

previous tip | next tip

 
© 2003 - 2006 all-BI GmbH, Business Intelligence Solutions