4 replies [Last post]
derb
Offline
newbie
Last seen: 7 years 28 weeks ago
Timezone: GMT+1
Joined: 2012-11-15
Posts: 6
Points: 7

Hello erveryone
Im a new Computer Science Student from Switzerland. At the moment, we need to create a website. I now wanted to implement a CSS style switcher based on JavaScript. Made everything, opend the webpage from my harddrive, worked perfectly.I am able to switch the style without any problems. So I've uploaded it to my server www.redseen.3owl.com.
Now, when I open the site over the internet, the style switcher refuses its work and does absolutly nothing. How can this be? As its written with JavaScript, the server can't be the reason (correct me when im wrong on this point). I'm really confused at the moment. Maybe someone of you has an idea why it could stop its work as soon as you open it from the server?
Thank you a lot for your assistance:)

cheers derb

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 5 years 33 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Your script has an error

When I view the console in Inspector I get:

Quote:

Uncaught SyntaxError: Unexpected identifier

Not sure why it works locally. :?

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

derb
Offline
newbie
Last seen: 7 years 28 weeks ago
Timezone: GMT+1
Joined: 2012-11-15
Posts: 6
Points: 7

I find this error msg in the

I find this error msg in the error console of the firefox browser. If I execute it locale, i don't get this error. The method "setActiveStyleSheet" is set in the styleswitcher.js which is linked correctly in the html file. I guess somehow the styleswitcher.js doesn't get initialized or something?

Error message

Zeitstempel: 16.11.2012 08:39:41
Fehler: ReferenceError: setActiveStyleSheet is not defined
Quelldatei: redseen.3owl.com/#
Zeile: 1

derb
Offline
newbie
Last seen: 7 years 28 weeks ago
Timezone: GMT+1
Joined: 2012-11-15
Posts: 6
Points: 7

I implemented the whole thing

I implemented the whole thing again and now it works. But sadly I still don't have a glimps of an idea why it wasn't working before.

Thanks anyway Smile

smithJames
smithJames's picture
Offline
newbie
Last seen: 7 years 19 weeks ago
Timezone: GMT+8
Joined: 2013-01-06
Posts: 3
Points: 5

Are these computer parts compatible?

Building a computer, want to make sure everything would work together without blowing up or anything XD, here are the parts:
Power Supply: Cooler Master eXtreme Power Plus 500w Power Supply
Motherboard: GIGABYTE GA-970A-D3 AM3+ AMD 970 SATA 6Gb/s USB 3.0 ATX AMD
Processor: AMD Phenom II X4 965 Black Edition Deneb 3.4GHz Socket AM3 125W Quad-Core
Hard Drive: Western Digital WD Blue WD2500AAKX 250GB 7200 RPM 16MB Cache SATA 6.0Gb/s 3.5" Internal Hard Drive -Bare Drive
Keyboard: Dell Inspiron 17r N7110 Laptop Keyboard
Optical Drive: Sony NEC ND-3530A CD/RW/ DVD RW Drive Internal Black
RAM: CORSAIR Vengeance 8GB (2 x 4GB) 240-Pin DDR3 SDRAM DDR3 1600 (PC3 12800) Desktop Memory Model CMZ8GX3M2A1600C9
Video Card: Sapphire Radeon HD6670 1 GB DDR3 VGA/DVI/HDMI PCI-Express Video Card
Sound Card: ASUS PCI 5.1 Channel Sound Card XONAR_DG
and here are the case and fans, but i do not really think they matter as far as parts working together, might be derping (not listing heatsink because i know these are Compatible Parts )
Case: COOLER MASTER Elite 430 RC-430-KWN1 Black Steel / Plastic Computer Case
Fans: Cooler Master SickleFlow 120mm Blue LED Computer Case Fan (4 of them)