XHTML validation problems

This is a discussion on "XHTML validation problems" within the Web Page Design section. This forum, and the thread "XHTML validation problems are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 16th, 2003, 23:43
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
XHTML validation problems

I talked my boss into letting me update our site to XHTML/CSS compliance (mostly cause he'll go with anything I recommend without having to know why). When running the validator I came up with a few unexpected problems.

It doesn't like
Code: Select all
<script language="Javascript">
or
<select onChange="whatever();">
It's the 'language' and 'onChange' parts it doesn't like. First off, what's the deal? Does XHTML not like Javascript and DHTML events?

Secondly if I leave these (or other) non-valid things in my XHTML what happens when different browsers encounter them?

  #2 (permalink)  
Old Dec 17th, 2003, 07:36
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
I would assume that all browsers are happy with

Code: Select all
<script language="whatever">
purely because, if the language isn't understood, the browser ignores the code. I remember this certainly being a case for older browsers.

onchange is a bit different, because I would assume that, due to your findings, it is not part of XHTML....?
  #3 (permalink)  
Old Dec 17th, 2003, 18:22
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
onChange - Drop the capital C to lowercase for XHTML,
might try that for the capital J in Javascript too...
  #4 (permalink)  
Old Dec 18th, 2003, 11:56
Reputable Member
Join Date: Aug 2003
Location: Singapore
Posts: 321
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gwx03
Note that XHTML requires you to define fully.

<script language="JavaScript" type="text/javascript">

That is somethng most people dont know or forget about XHTML ( and yea, I forgot to put it in my tutorial )

yes. it should be
<select onchange="whatever();">

XHTML doesn't like caps. Didn't you read my tutorial!!!
  #5 (permalink)  
Old Dec 18th, 2003, 15:50
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Yeah, Netscape used to ignore events that didn't have camelcase though, so I've always been specific about that, but...screw NS.
  #6 (permalink)  
Old Dec 31st, 2003, 08:51
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Hmm, this is what the validator gives me:

Code: Select all
Line 16, column 17: there is no attribute "language" (explain...). 
  <script language="JavaScript" src="rollovers.js" type="text/javascript">
so I took the language part out and it seemed happy.

So what happens in the real world when I do something invalid, like use the name attribute in a form along with id?
  #7 (permalink)  
Old Jan 4th, 2004, 15:45
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
you get screwed? Sounds like this is something they've overlooked?
Closed Thread

Tags
xhtml, validation, problems

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
XHTML W3C validation problems Tim356 Web Page Design 5 Oct 11th, 2005 22:46
W3C Xhtml Validation... Pheonix Implemented Suggestions 13 Oct 7th, 2005 12:44
XHTML Validation Help socalledlove Web Page Design 7 May 3rd, 2005 21:06
XHTML validation keeps21 Web Page Design 4 Mar 21st, 2005 08:27
A few problems with XHTML validation criticalerror Web Page Design 5 May 3rd, 2004 19:35


All times are GMT. The time now is 08:49.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43