473,399 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

CSS changer - how to implement spanning multiple subpages? (Second try - no response on last post)


I have a (dummy) page that uses PHP to change CSS - so that different
looks can be applied without loading the complete page again etc, and to
ease the deployment of new looks - much like www.csszengarden.com does
(actually part of my script is from their site).

Anyway - currently the PHP-script only covers the first page - if I have
subpages, the different CSS doesn't "follow through" - I'm wondering how
I can make it.

The code I'm using is this (with comments):

<?php

$tempCSS = $HTTP_GET_VARS["cssfile"];
if ($tempCSS != "") {
$loadCSS = $tempCSS;
} else {
/* sets a default CSS file if no querystring specified */
$loadCSS = "default.css";
};
$currentDesign = $loadCSS;


<!-- make sure this goes somewhere between <head> and </head> -->
<link rel="stylesheet" type="text/css" href="<?php echo $loadCSS; ?>"
title="default" media="screen" />

<!-- to link any particular stylesheet later, just add a querystring to
the current page: -->
<a href="thispage.html?cssfile=/002/002.css">Change Style</a>

How can I take the current value from the address bar and add it to any
link that's a local link to subpages?
--
ØNL
http://www.langbakk.no
Jul 17 '05 #1
5 1993
How can I take the current value from the address bar and add it to any
link that's a local link to subpages?


Use cookies.
Jul 17 '05 #2
I denne meldingen:cm**********@titan.btinternet.com,
skrev: 2metre <2m****@xxxhersham.net> følgende:
How can I take the current value from the address bar and add it to
any link that's a local link to subpages?


Use cookies.


Yes, I could probably do that - how would I do this exactly, though?

Since the "change look" menu is present on all pages, it needs then to
set a cookie _every time_ a user changes the look (or am I missing
something here?) - and that could result in a lot of cookies - at least
I think so.

What I was looking for was more like a way to add a value to every link
that's clicked on the page _that isn't a "change look" link_ which would
keep the last clicked "look" when the user changes pages.

As the current CSS-file that's in use is shown in the address bar, it
should be possible, shouldn't it?

--
ØNL
http://www.langbakk.no
Jul 17 '05 #3
Ørjan Langbakk wrote:
Since the "change look" menu is present on all pages, it needs then to
set a cookie _every time_ a user changes the look (or am I missing
something here?) - and that could result in a lot of cookies - at least
I think so.

If your cookie is called (for example) 'cookiepage', every cookie change
request just changes the value of that. Only 1 cookie. Cookie's are
available site-wide.
Jul 17 '05 #4
Ørjan Langbakk wrote:
I have a (dummy) page that uses PHP to change CSS - so that different
looks can be applied without loading the complete page again etc, and
to ease the deployment of new looks - much like www.csszengarden.com
does (actually part of my script is from their site).

Anyway - currently the PHP-script only covers the first page - if I
have subpages, the different CSS doesn't "follow through" - I'm
wondering how I can make it.


http://csschanger.usenetshit.info/

I would recommend using this in conjunction with a cookie if you want to
remember the visitor's selection between visits.
Jul 17 '05 #5
I denne meldingen:yP*******************@news.xtra.co.nz,
skrev: Nik Coughin <nr***********@woosh.co.nz> følgende:
Ørjan Langbakk wrote:
I have a (dummy) page that uses PHP to change CSS - so that different
looks can be applied without loading the complete page again etc, and
to ease the deployment of new looks - much like www.csszengarden.com
does (actually part of my script is from their site).

Anyway - currently the PHP-script only covers the first page - if I
have subpages, the different CSS doesn't "follow through" - I'm
wondering how I can make it.


http://csschanger.usenetshit.info/

I would recommend using this in conjunction with a cookie if you want
to remember the visitor's selection between visits.


Looks promising - I'll look into it as soon as I have time! Thanks!
--
ØNL
http://www.langbakk.no
Jul 17 '05 #6

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

Similar topics

11
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g.,...
7
by: Billy Jacobs | last post by:
I am using a datagrid to display some data. I need to create 2 header rows for this grid with columns of varying spans. In html it would be the following. <Table> <tr> <td colspan=8>Official...
3
by: Arun | last post by:
Hi, I have simple question to ask. How to write multiple Binary files to the Browser using Asp.Net and Visual C#.net I have seen examples where single binary file is written to browser. ...
5
by: Stacey Levine | last post by:
I have a webservice that I wanted to return an ArrayList..Well the service compiles and runs when I have the output defined as ArrayList, but the WSDL defines the output as an Object so I was...
60
by: Shawnk | last post by:
Some Sr. colleges and I have had an on going discussion relative to when and if C# will ever support 'true' multiple inheritance. Relevant to this, I wanted to query the C# community (the...
10
by: Girish | last post by:
Hi Everyone, I am passing a form to a php script for further processing. I am able to retrieve the last value set for that given form variable using $variable=$_REQUEST;
1
by: dnes | last post by:
Open Multiple New Browser Windows from ASP.NET I'm having trouble figuring out how to open multiple new browser windows (each one displaying something different). As you can see from the code...
2
by: phpnewbie26 | last post by:
I currently have two drop down menus where the second one is populated from the first one. My second drop down menu should be able to do multiple selection. I have searched online and found out how...
6
by: phpnewbie26 | last post by:
My current form has one multiple select drop down menu as well as few other drop down menus that are single select. Originally I had it so that the multiple select menu was first, but this created...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
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...

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.