The Cave of Dragonflies forums

Go Back   The Cave of Dragonflies forums > Websites > Webmaster Help and Discussion

Notices

Reply
 
Thread Tools
  #1  
Old 03-17-2013, 06:32 AM
effervesce's Avatar
effervesce effervesce is offline
bulletproof loneliness, at best
 
Join Date: February 27, 2011
Location: slřwtřwn
Age: 16
Posts: 1,433
Pronoun: she/her/hers
effervesce is an unknown quantity at this point
Send a message via Skype™ to effervesce
Posticon Scared Eep, stylesheet switcher.

Hi!

I'm no whiz at HTML/CSS, but I have some knowledge at it; probably best to get that out there.

So I have three stylesheets, the default is titled "title="stylesheet", the other two are "title="alternate stylesheet", so I can switch between them via browser, but I'd like to somehow grab cookies and get it together dynamically. I have absolutely no idea how to do that, and I have no knowledge in any other languages (I dabbled in Java and JavaScript, but not very far beyond "Hello World!"). So, I don't know, but. Help?
__________________
basically gone idk

tumblr: http://alone-on-an-aeroplane.tumblr.com

((I'm there more often than I'm here so yeah))
Reply With Quote
  #2  
Old 07-17-2013, 03:07 AM
42aruaour's Avatar
42aruaour 42aruaour is offline
Time: I come from the past. O.o
 
Join Date: July 17, 2013
Location: This Universe, Planet Earth
Age: 18
Posts: 118
Pronoun: he
42aruaour is an unknown quantity at this point
Default Re: Eep, stylesheet switcher.

I am not quite sure what you wish to do, but I'm guessing that you want to be able to automate the changing of a stylesheet when there is a different local variable? Would it be something like the front page style switcher on TCoD?

In that case, then you could use many different languages to get it done. I would suggest Javascript, unless you needed to run this with a database, in that case then Javascript and PHP.

I think you probably want to use Javascript. There should either be two scripts, or a script with two functions. One of which, upon page load, checks for the cookie, and makes the appropriate stylesheet selection. The other would be used in an html form and creates the cookie to last a time span (probably around thirty days?). The value in the cookie would probably be either default, style1, or style2.

Running a quick google search brings this page, It should help in this case:
http://www.htmlgoodies.com/beyond/ja...Cookie-Huh.htm

And if you have any problems, you can go to Stack Overflow and check for answers to that specific problem.

Sorry I couldn't help much. I have only done basic scripting with javascript and am not familiar with it, because I use PHP more often.
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

Forum Jump


All times are GMT. The time now is 12:12 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Pokémon, Pikachu and all other Pokémon characters © Nintendo, Game Freak and Creatures Inc. The Cave of Dragonflies, content, styles, etc. © Butterfree/Dragonfree/antialiasis.
Forum now hosted by Eevee's HQ.