Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > switching stylesheets dynamically..

Reply
Thread Tools

switching stylesheets dynamically..

 
 
maya
Guest
Posts: n/a
 
      02-01-2007

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









 
Reply With Quote
 
 
 
 
-Lost
Guest
Posts: n/a
 
      02-01-2007
"maya" <(E-Mail Removed)> wrote in message
news:45c25130$0$1345$(E-Mail Removed). 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


 
Reply With Quote
 
 
 
 
maya
Guest
Posts: n/a
 
      02-01-2007
-Lost wrote:
> "maya" <(E-Mail Removed)> wrote in message
> news:45c25130$0$1345$(E-Mail Removed). 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...

 
Reply With Quote
 
-Lost
Guest
Posts: n/a
 
      02-01-2007
"maya" <(E-Mail Removed)> wrote in message
news:45c259d2$0$1345$(E-Mail Removed). com...
> -Lost wrote:
>> "maya" <(E-Mail Removed)> wrote in message
>> news:45c25130$0$1345$(E-Mail Removed). 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


 
Reply With Quote
 
maya
Guest
Posts: n/a
 
      02-01-2007
-Lost wrote:
> "maya" <(E-Mail Removed)> wrote in message
> news:45c259d2$0$1345$(E-Mail Removed). com...
>> -Lost wrote:
>>> "maya" <(E-Mail Removed)> wrote in message
>>> news:45c25130$0$1345$(E-Mail Removed). 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..

 
Reply With Quote
 
-Lost
Guest
Posts: n/a
 
      02-01-2007
"maya" <(E-Mail Removed)> wrote in message
news:45c25cb6$0$1342$(E-Mail Removed). com...
> -Lost wrote:
>> "maya" <(E-Mail Removed)> wrote in message
>> news:45c259d2$0$1345$(E-Mail Removed). com...
>>> -Lost wrote:
>>>> "maya" <(E-Mail Removed)> wrote in message
>>>> news:45c25130$0$1345$(E-Mail Removed). 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
switching between stylesheets Wade Javascript 5 01-26-2008 10:59 PM
Process Switching vs. Fast/CEF Switching? asdf Cisco 7 05-29-2007 05:26 PM
css in external stylesheets for aspx pages Rod Snyder ASP .Net 3 02-02-2004 04:01 PM
Changeing Stylesheets ADRIAN ASP .Net 0 11-05-2003 05:33 PM
Changing stylesheets Adrian ASP .Net 1 10-27-2003 04:49 PM



Advertisments