Sent by webmaster on 15 February 2005 04:04
Hi,
I have tried with little success to use the style switcher located at:
http://www.alistapart.com/articles/alternate/
And following the instructions (cut & paste) have made a very simple
site located at: http://www.myblueshoes.com/styleswitcher.js-test.htm
(This site passes html validation) that does not respond to the script-
but rater produces an error on the page.
When time allows, can someone please assist me to get it (or something
like it) working.
Many thanks and best regards,
Lawrence Touitou
[EMAIL-REMOVED]
-----Original Message-----
From: Bob Easton [EMAIL-REMOVED]]
Sent: Saturday, January 22, 2005 4:22 AM
To: webmaster
Subject: Re: [css-d] Can CSS allow real-time style changes?
webmaster wrote:
> Hey Mr Easton, Thanks again for your tips!
>
> If you have a moment,
>
> (Despite spending some hours with it, I can't get the 'ol switcher.js
> working.) I get a page errpr too! Have you ever used it in a page?
>
> Can you please take a look at my source code to see if I overlooked
> anything obvious
> http://www.myblueshoes.com/web_template2_home.htm
>
Lawrence,
The error message is "object expected" which usually means there is some
sort of syntax error. I have not diagnosed the problem to be absolutely
certain of the precise eroor, but here are some observations and a
course of action that well lead you to success.
While this particular error is (I think) with the comment statement just
ahead of the anchor links for the switcher, there are a number of
problems with the HTML.
Let's start at the top. It is a good practice to specify a !DOCTYPE
which tells browsers which variant of HTML you are using. A great
article about !DOCTYPE is referenced below [1].
As an aside, some of the code is an XHTML variant, but much of it is
not.
Next, it is good form to keep all scripts up in the <head> section, out
of the <body>. That helps prevent the kind of syntax error that appears
to be the culprit here.
After that, start identifying and resolving coding errors. The HTML
validator at the W3C is excellent and can be your very good friend in
finding and resolving problems. [2]
Once the current coding problems are resolved, I bet the switcher will
work. You can see a report of things as they now stand at:
www.myblueshoes.com">http://validator.w3.org/check?verbose=1&uri=http%3A//www.myblueshoes.com
/web_template2_home.htm
Last, take your next questions back to the list rather than an
indivdual. The odds are better of hearing a quick answer when more
people see the question.
[1] http://www.alistapart.com/articles/doctype/
[2] http://validator.w3.org/
--
Bob Easton
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/