473,555 Members | 2,297 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

activate different stylesheet

Hi

I'm looking for a script to activate a different stylesheet for a page,
according the link a visitor clicks on.

More specific, I have a page with a topic, divided into three sub-topics. I
also have a printer image to show a hidden layer (when a visitor clicks on
the image). Finally, I have three different stylesheets for media="print",
each one hiding the sub-topics -but one, and another one stylesheet showing
the whole document.

Well, I want to put four links in the layer to act like this:

link1: activate print1.css (shows sub-topic1 / hides the rest)
link2: activate print2.css (shows sub-topic2 / hides the rest)
link3: activate print3.css (shows sub-topic3 / hides the rest)
link4: activate printAll.css (shows all)

Is there a ready script for this?
(My knowledge in JavaScrip is extremely limited, and something similar I've
found at www.alistapart.com involves cookies, so I don't know how to take
them apart)

TIA
_______________ _____________
geotso's stories
Be thou attentive!...

(Please, remove the TRAP to contact me)
Jul 20 '05 #1
1 1855
visit http://www.csszengarden.com/ which offers an interesting perspective on
applying stylesheets. The code there should help. (it applies various style
sheets to the same html code to create diff visual effects).
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1961
by: Hugh Sparks | last post by:
When processing an xml document that contains elements such as: <element xmlns="goop"/> ... <element xmlns="gleep"/> I want to create two xsl stylesheet templates: one that matches the elements that contain the namespace declaration for "goop" and one that matches the elements that contain the namespace declaration for "gleep".
8
2346
by: Sebastian Kerekes | last post by:
Greetings, I'm developing an application that supports multiple languages. In my XSL I use variables to place the text where it belongs to. At the top of the document I include those variables - the included file depends on the language. Atm I'm editing those file manually. Luckily atm it's only two languages I have to work with, but...
2
1734
by: Peter Clifton | last post by:
Hello all, I am very new to this subject and learning by example. I have a small inconsistency in an XML file when transformed using different processors. I was wondering if someone could shed light on why this is and if possible how to resolve the inconsistency. I am attempting to change the element names in the source XML file from...
16
4179
by: Geoff Cox | last post by:
Hello, I publish some web pages using large fonts and would like to give the user the opportunity to print the pages using a smaller font. I believe that this is possible using different style sheets? I am not clear how the user would select the different .css files? Seems to be easier than having duplicate html files ...
3
3182
by: Phil Thompson | last post by:
does it matter in which order i place different style sheets i.e. <link rel="stylesheet" type="text/css" media="screen" href="style/screen.css" /> <link rel="stylesheet" type="text/css" media="print" href="style/print.css" /> is this better than this <link rel="stylesheet" type="text/css" media="print" href="style/print.css"
2
1677
by: JR | last post by:
Hi. I have a CGI script that will need to call itself an unknown number of times, to add rows, run queries, etc. At the bottom of the output that is produced by the script, there are four buttons. I need one of the buttons to simply be a back button. I have this button working fine. I need the second and fourth buttons to point to the...
3
3490
by: active | last post by:
I remember when I checked NewGroups for comments about the VB6 Activate event and found that many thought it was not a reliable way to keep track of which form has focus. There was enough bad press that I avoided it. I now have a project with MDI child forms and non-MDI child forms coming and going as the user selects different options. I...
0
2191
by: venkat | last post by:
Hi, I have migrated application code to c#2.0 and when I build the solution I am getting the following warning. My application interacts with Excel. So I need to invoke different methods on Workbook class. At one line I am activating a workbook using workbook object. Activate(); Then I am getting the following error. Ambiguity between...
2
1337
by: pargat.singh | last post by:
Hi Everyone: I have ASP.Net 2.0 application which is being called from a portal written in ASP.Everything is working fine but i have a question regarding the stylesheet. We have different stylesheets for different clients, client_groups etc. In ASP Pages i can do <link rel="stylesheet" type="text/css" href="images/portal.css"/> <!--...
0
7622
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7547
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8060
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6176
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5452
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5171
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
865
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.