FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Javascript CSS changer.





hobbes
Here is a javascript that allows the user to change which .css file is used. I think this is very cool and I would like to have it on my site. However, I do not like javascript and I am wondering if there is a .cgi or .php script that does the same.

Also, is my dislike of javascript justified. Is it really bad or am I just... yea...

here is the link
http://www.clownunion.com/js-scheme.php
Stubru Freak
With javascript it changes instantly, with php it doesn't

Code for php would be

Code:

if(isset($_POST["newstylesheet"])){
echo $_POST["newstylesheet"];
}


Put this where you want the stylesheet to appear, and make sure you post the name of the new stylesheet to the page
Praying Mantis
hobbes wrote:
Here is a javascript that allows the user to change which .css file is used. I think this is very cool and I would like to have it on my site. However, I do not like javascript and I am wondering if there is a .cgi or .php script that does the same.

Also, is my dislike of javascript justified. Is it really bad or am I just... yea...

here is the link
http://www.clownunion.com/js-scheme.php


Well javascript is good in most cases but when your site fully relies on javascript just to run its a bad thing. I think you should build your site from the ground up and then add in javascript for optional things.
rohan2kool
javascript is good for small and 'not-so-security-intensive' things as it is fast and provides more ease of use to the users. As with php, the request needs to go back to the server and then the page is reloaded which adds to their waiting time. I strongly advise you against it.

As for security intensive things like authentication, registration etc., you should go for server-side.
Related topics
What computer languages you know?
internet explorer
Windows Tips&tricks!
CSS or Javascript?
PHP/Blogger error
Flash is for...?
Programming vs Career
[JS]Some must have Javascript and related stuffs-updated!!!!
DreamWeaver or Visual Studio
Future FriHost April Fool's Day Suggestions
PHP?
Expanding Javascript+CSS List
A good place to learn html/php/javascript/etc....
CSS in Action Script
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.