switching stylesheets dynamically..

Discussion in 'Javascript' started by maya, Feb 1, 2007.

  1. maya

    maya Guest

    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..
     
    maya, Feb 1, 2007
    #1
    1. Advertising

  2. maya

    -Lost Guest

    "maya" <> wrote in message
    news:45c25130$0$1345$...
    > 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
     
    -Lost, Feb 1, 2007
    #2
    1. Advertising

  3. maya

    maya Guest

    -Lost wrote:
    > "maya" <> wrote in message
    > news:45c25130$0$1345$...
    >> 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
    >
    >

    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...
     
    maya, Feb 1, 2007
    #3
  4. maya

    -Lost Guest

    "maya" <> wrote in message
    news:45c259d2$0$1345$...
    > -Lost wrote:
    >> "maya" <> wrote in message
    >> news:45c25130$0$1345$...
    >>> 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!"

    >
    > 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
     
    -Lost, Feb 1, 2007
    #4
  5. maya

    maya Guest

    -Lost wrote:
    > "maya" <> wrote in message
    > news:45c259d2$0$1345$...
    >> -Lost wrote:
    >>> "maya" <> wrote in message
    >>> news:45c25130$0$1345$...
    >>>> 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!"

    >> 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..
     
    maya, Feb 1, 2007
    #5
  6. maya

    -Lost Guest

    "maya" <> wrote in message
    news:45c25cb6$0$1342$...
    > -Lost wrote:
    >> "maya" <> wrote in message
    >> news:45c259d2$0$1345$...
    >>> -Lost wrote:
    >>>> "maya" <> wrote in message
    >>>> news:45c25130$0$1345$...
    >>>>> 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!"
    >>> 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
     
    -Lost, Feb 1, 2007
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Adrian

    Changing stylesheets

    Adrian, Oct 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    335
    Esteban Felipe
    Oct 27, 2003
  2. ADRIAN

    Changeing Stylesheets

    ADRIAN, Nov 5, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    372
    ADRIAN
    Nov 5, 2003
  3. =?Utf-8?B?QWxhbiBMYW1iZXJ0?=

    Dynamically loading stylesheets

    =?Utf-8?B?QWxhbiBMYW1iZXJ0?=, Nov 23, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,374
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=
    Nov 24, 2004
  4. Paul A.
    Replies:
    8
    Views:
    194
    Robert Klemme
    Apr 30, 2010
  5. Wade

    switching between stylesheets

    Wade, Jan 26, 2008, in forum: Javascript
    Replies:
    5
    Views:
    97
Loading...

Share This Page