Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   validation seems wrong (http://www.velocityreviews.com/forums/t162589-validation-seems-wrong.html)

windandwaves 08-28-2005 10:36 AM

validation seems wrong
 
Hi Folk

I validate my page:

http://validator.w3.org/check?uri=ht...%2Fdealers.php

and got all sorts of errors for html that actually resides in javascript.
What can I do about this?

The actual page is:

http://www.e-61rocket.co.nz/dealers.php

any other comments on this site are also greatly appreciated.

Thanks in advance.

Nicolaas



David Dorward 08-28-2005 10:52 AM

Re: validation seems wrong
 
windandwaves wrote:

>

http://validator.w3.org/check?uri=ht...%2Fdealers.php
> and got all sorts of errors for html that actually resides in javascript.
> What can I do about this?


Exactly what the explanatory message under the error says. Read the FAQ:
http://validator.w3.org/docs/help.html#faq-javascript

> The actual page is:
> http://www.e-61rocket.co.nz/dealers.php
> any other comments on this site are also greatly appreciated.


D
E
A
L
E
R
S
home
features
secret
accessories
training
dealers
Please move your mouse over the image to discover more...
dealers

* Test it in Lynx.
* Don't mention the mechanics (What image? What mouse?)
* Don't put things in divs if they are not logical blocks


--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is

rf 08-28-2005 11:52 AM

Re: validation seems wrong
 
windandwaves wrote:

> Hi Folk
>
> I validate my page:
>
>

http://validator.w3.org/check?uri=ht...co.nz%2Fdealer
s.php
>
> and got all sorts of errors for html that actually resides in javascript.
> What can I do about this?


Stop using javascript to create such a mission critical part of your page as
your navigaion.

Hint: Turn javascript off in your browser and view the result. Just a map of
NZ. This is what the 10% of people with javascript unavailable will see and
it is also what google will see. No links: no listing.

Cheers
Richard.



Neredbojias 08-28-2005 12:44 PM

Re: validation seems wrong
 
With neither quill nor qualm, windandwaves quothed:

> Hi Folk
>
> I validate my page:
>
> http://validator.w3.org/check?uri=ht...%2Fdealers.php
>
> and got all sorts of errors for html that actually resides in javascript.
> What can I do about this?
>
> The actual page is:
>
> http://www.e-61rocket.co.nz/dealers.php
>
> any other comments on this site are also greatly appreciated.


While viewing your map, I was sort of reminded of one of them blobs from
the Rochaert Tests they gave me during my psycho years.

Anyway, your javascript has errors, too.

Incidentally, is it true that everybody in New Zealand is full of zeal?

--
Neredbojias
Contrary to popular belief, it is believable.

cwdjrxyz@yahoo.com 08-28-2005 04:31 PM

Re: validation seems wrong
 

windandwaves wrote:
> Hi Folk
>
> I validate my page:
>
> http://validator.w3.org/check?uri=ht...%2Fdealers.php
>
> and got all sorts of errors for html that actually resides in javascript.
> What can I do about this?
>
> The actual page is:
>
> http://www.e-61rocket.co.nz/dealers.php
>
> any other comments on this site are also greatly appreciated.
>
> Thanks in advance.
>
> Nicolaas


Your problem likely is very easy to solve. When you write html tags
within a javascript, their closing tags must all be backslashed. For
example: <\/p>, <\/div>, and <\/h1>. The script usually will work
without backslashing. The reason for this backslashing is explained
somewhere on the W3C sites. This is the source of one of the most
frequent reports of validation problems to the W3C.

I have no problem with using javascript on a site. It may be a good
idea to include a warning that javascript needs to be on. However for
those wishing to reach the few % of people who turn off javascript and
will not turn it on, there usually is a way to defeat this problem. I
notice you are using php. You usually can write a server side script in
php that will do the same thing as a client side javascript. This php
script can not be turned off by the viewing browser. Or you can instead
use Perl or several other server side languages if any of these strike
your fancy.


cwdjrxyz@yahoo.com 08-28-2005 08:23 PM

Re: validation seems wrong
 

cwdjrxyz@yahoo.com wrote:
> windandwaves wrote:
> > Hi Folk
> >
> > I validate my page:
> >
> > http://validator.w3.org/check?uri=ht...%2Fdealers.php
> >
> > and got all sorts of errors for html that actually resides in javascript.
> > What can I do about this?
> >
> > The actual page is:
> >
> > http://www.e-61rocket.co.nz/dealers.php
> >
> > any other comments on this site are also greatly appreciated.
> >
> > Thanks in advance.
> >
> > Nicolaas

>
> Your problem likely is very easy to solve. When you write html tags
> within a javascript, their closing tags must all be backslashed. For
> example: <\/p>, <\/div>, and <\/h1>. The script usually will work
> without backslashing. The reason for this backslashing is explained
> somewhere on the W3C sites. This is the source of one of the most
> frequent reports of validation problems to the W3C.
>
> I have no problem with using javascript on a site. It may be a good
> idea to include a warning that javascript needs to be on. However for
> those wishing to reach the few % of people who turn off javascript and
> will not turn it on, there usually is a way to defeat this problem. I
> notice you are using php. You usually can write a server side script in
> php that will do the same thing as a client side javascript. This php
> script can not be turned off by the viewing browser. Or you can instead
> use Perl or several other server side languages if any of these strike
> your fancy.


A page at the WDG explains the reason for backslashing closing html
tags within scripts. See
http://www.htmlhelp.com/tools/valida...ms.html#script . This
page also gives supporting links back to the W3C specifications.


windandwaves 08-28-2005 10:07 PM

Re: validation seems wrong
 
David Dorward wrote:
> windandwaves wrote:
>
>>

> http://validator.w3.org/check?uri=ht...%2Fdealers.php
>> and got all sorts of errors for html that actually resides in
>> javascript. What can I do about this?

>
> Exactly what the explanatory message under the error says. Read the
> FAQ: http://validator.w3.org/docs/help.html#faq-javascript
>
>> The actual page is:
>> http://www.e-61rocket.co.nz/dealers.php
>> any other comments on this site are also greatly appreciated.

>
> D
> E
> A
> L
> E
> R
> S
> home
> features
> secret
> accessories
> training
> dealers
> Please move your mouse over the image to discover more...
> dealers
>
> * Test it in Lynx.
> * Don't mention the mechanics (What image? What mouse?)
> * Don't put things in divs if they are not logical blocks



yes, that is right, that is exactly what you see in the latest version of
firefox or IE, just laid-out a bit sexier ;-)



windandwaves 08-28-2005 10:09 PM

Re: validation seems wrong
 
rf wrote:
> windandwaves wrote:
>
>> Hi Folk
>>
>> I validate my page:
>>
>>

> http://validator.w3.org/check?uri=ht...co.nz%2Fdealer
> s.php
>>
>> and got all sorts of errors for html that actually resides in
>> javascript. What can I do about this?

>
> Stop using javascript to create such a mission critical part of your
> page as your navigaion.
>
> Hint: Turn javascript off in your browser and view the result. Just a
> map of NZ. This is what the 10% of people with javascript unavailable
> will see and it is also what google will see. No links: no listing.
>
> Cheers
> Richard.


Hi Richard, please try again .... there is a mouse-over effect, but a link
is also provided for those without javascript (and the googles of this
world).



windandwaves 08-28-2005 10:11 PM

Re: validation seems wrong
 
Neredbojias wrote:

......

> Incidentally, is it true that everybody in New Zealand is full of
> zeal?


can you elaborate on that a little ;-) Are you referring to the fact that
we are one of the best performing nations on earth?



windandwaves 08-28-2005 10:15 PM

Re: validation seems wrong
 
cwdjrxyz@yahoo.com wrote:
> windandwaves wrote:
>> Hi Folk
>>
>> I validate my page:
>>
>> http://validator.w3.org/check?uri=ht...%2Fdealers.php
>>
>> and got all sorts of errors for html that actually resides in
>> javascript. What can I do about this?
>>
>> The actual page is:
>>
>> http://www.e-61rocket.co.nz/dealers.php
>>
>> any other comments on this site are also greatly appreciated.
>>
>> Thanks in advance.
>>
>> Nicolaas

>
> Your problem likely is very easy to solve. When you write html tags
> within a javascript, their closing tags must all be backslashed. For
> example: <\/p>, <\/div>, and <\/h1>. The script usually will work
> without backslashing. The reason for this backslashing is explained
> somewhere on the W3C sites. This is the source of one of the most
> frequent reports of validation problems to the W3C.


Will fix - thank you.


> I have no problem with using javascript on a site. It may be a good
> idea to include a warning that javascript needs to be on. However for
> those wishing to reach the few % of people who turn off javascript and
> will not turn it on, there usually is a way to defeat this problem. I
> notice you are using php. You usually can write a server side script
> in php that will do the same thing as a client side javascript.


Great idea, i actually already provided links that are the same as the
mouse-over, but I will also actively check if javascript is on and serve a
different page if it is not....

Thank you again.




All times are GMT. The time now is 11:13 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.