switching stylesheets dynamically..

M

maya

hi,

I'm using this script to switch stylesheets dynamically (in response to
user input..)

http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm

(sorry can't show url, am in process of changing webhosts right now..)

it works pretty well, when user switches from page to page colors are
maintained.. one of the pages is a form.. only little problem is when
form is submitted the thankyou-pg displays default color-scheme
regardless of what color-scheme user has chosen, so I need to know what
exactly to pass in form (in a hidden field in form..) so color-scheme is
maintained..

also when user goes "back" from thank-you page (to page from where they
hit 'feedback' link..) I need to know what to pass as a param in url
query string so color-scheme is maintained..

thank you very much..
 
L

-Lost

maya said:
I'm using this script to switch stylesheets dynamically (in response to user input..)

http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm

it works pretty well, when user switches from page to page colors are maintained.. one
of the pages is a form.. only little problem is when form is submitted the thankyou-pg
displays default color-scheme regardless of what color-scheme user has chosen, so I need
to know what exactly to pass in form (in a hidden field in form..) so color-scheme is
maintained..

also when user goes "back" from thank-you page (to page from where they hit 'feedback'
link..) I need to know what to pass as a param in url query string so color-scheme is
maintained..

In the famous words of Cookie Monster, "Coooookies!"

-Lost
 
M

maya

-Lost said:
In the famous words of Cookie Monster, "Coooookies!"

-Lost
ok, I thought so, but wasn't sure.. how come it works for all pages in
app except thank-you page? I have not changed code in this script in
any way, was wondering why it doesn't work for thank-you page.. (btw,
do you know if you can grab a cookie set with JavaScript with java? can
I assume a cookie is a cookie is a cookie? :)

thank you...
 
L

-Lost

maya said:
ok, I thought so, but wasn't sure.. how come it works for all pages in app except
thank-you page?

No clue. I have not seen your implementation.

But my first question would be what is different from "all pages in app" and "thank-you"
page?
I have not changed code in this script in any way, was wondering why it doesn't work
for thank-you page.. (btw, do you know if you can grab a cookie set with JavaScript
with java? can I assume a cookie is a cookie is a cookie? :)

Yes, you can.

-Lost
 
M

maya

-Lost said:
No clue. I have not seen your implementation.

But my first question would be what is different from "all pages in app" and "thank-you"
page?

nothing, that's it, as far as this stylesheet-switching goes.. all
pages in app have in header:

<link rel="stylesheet" type="text/css" href="css_gray.css">
<link rel="alternate stylesheet" type="text/css" media="screen"
title="white-theme" href="css_white.css"> etc.. (two more stylesheets..)
<script src="styleswitch.js" type="text/javascript"></script>
(all processing code is in styleswitch.js..)

thank you..
 
L

-Lost

maya said:
nothing, that's it, as far as this stylesheet-switching goes.. all pages in app have in
header:

<link rel="stylesheet" type="text/css" href="css_gray.css">
<link rel="alternate stylesheet" type="text/css" media="screen" title="white-theme"
href="css_white.css"> etc.. (two more stylesheets..)
<script src="styleswitch.js" type="text/javascript"></script>
(all processing code is in styleswitch.js..)

Is the thank-you page on the same server and domain?

And if you are sure you have not changed anything, I have no clue.

-Lost
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top