HTML and Scripting Changing Layouts..?

Discussion in 'Computers' started by Zanza, Aug 10, 2005.

  1. Zanza

    Zanza .Net-ing & PHP-ing~*
    Staff Member

    Joined:
    Jul 16, 2001
    Messages:
    4,652
    Likes Received:
    117
    When you visit some site, they have an option allowing you to chose a layout from a list of various layouts.

    My question is, how can I do that, specially with the best way to do so (i.e. time & space saving)?
     
    #1
  2. BakaMattSu

    BakaMattSu ^__^
    Staff Member

    Joined:
    Feb 16, 2001
    Messages:
    4,871
    Likes Received:
    122
    Develop style sets - more commonly referred to as "skins". In other words, your website would have multiple versions of the same css file - for example a "purple.css" and "blue.css".

    From there you simply set a cookie on the user's machine when they pick a style, and dynamically load the corresponding css as the page loads.

    Javascript Sample
     
    #2
    1 person likes this.
  3. Zanza

    Zanza .Net-ing & PHP-ing~*
    Staff Member

    Joined:
    Jul 16, 2001
    Messages:
    4,652
    Likes Received:
    117
    Neat-o! I have a slight background on C & C++, not Java though (going to -hopfully- take it this coming course). Does this work also for images? I mean, is this only for the font color, a-link, v-line etc only, while the images I link to a new page?

    Umm.. to make it more clearly.. please visit this page:
    http://www.eastblue.net/

    at the bottom-left there is "Themes", whenever you click on one, you'll have a different image. Does the previous Javascript Sample work like this?

    *bow*
     
    #3

Share This Page