By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,263 Members | 2,640 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,263 IT Pros & Developers. It's quick & easy.

switching stylesheets dynamically..

P: n/a

hi,

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

http://www.dynamicdrive.com/dynamici...etswitcher.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..



Feb 1 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"maya" <ma********@yahoo.comwrote in message
news:45**********************@reader.greatnowhere. com...
I'm using this script to switch stylesheets dynamically (in response to user input..)

http://www.dynamicdrive.com/dynamici...etswitcher.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
Feb 1 '07 #2

P: n/a
-Lost wrote:
"maya" <ma********@yahoo.comwrote in message
news:45**********************@reader.greatnowhere. com...
>I'm using this script to switch stylesheets dynamically (in response to user input..)

http://www.dynamicdrive.com/dynamici...etswitcher.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

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...

Feb 1 '07 #3

P: n/a
"maya" <ma********@yahoo.comwrote in message
news:45**********************@reader.greatnowhere. com...
-Lost wrote:
>"maya" <ma********@yahoo.comwrote in message
news:45**********************@reader.greatnowhere .com...
>>I'm using this script to switch stylesheets dynamically (in response to user input..)

http://www.dynamicdrive.com/dynamici...etswitcher.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!"

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
Feb 1 '07 #4

P: n/a
-Lost wrote:
"maya" <ma********@yahoo.comwrote in message
news:45**********************@reader.greatnowhere. com...
>-Lost wrote:
>>"maya" <ma********@yahoo.comwrote in message
news:45**********************@reader.greatnowher e.com...
I'm using this script to switch stylesheets dynamically (in response to user input..)

http://www.dynamicdrive.com/dynamici...etswitcher.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!"
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?
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..

Feb 1 '07 #5

P: n/a
"maya" <ma********@yahoo.comwrote in message
news:45**********************@reader.greatnowhere. com...
-Lost wrote:
>"maya" <ma********@yahoo.comwrote in message
news:45**********************@reader.greatnowhere .com...
>>-Lost wrote:
"maya" <ma********@yahoo.comwrote in message
news:45**********************@reader.greatnowhe re.com...
I'm using this script to switch stylesheets dynamically (in response to user
input..)
>
http://www.dynamicdrive.com/dynamici...etswitcher.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!"
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?

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
Feb 1 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.