[XHTML 1.1] Attributes can't be used. Alternatives?

Glaanieboy

OSNN Veteran Addict
Joined
6 Mar 2002
Messages
2,628
Have a look at my shoutbox (still WIP): http://glaanieboy.nl/shoutbox.php. As you see, I am trying to make my website XHTML 1.1 compliant, just because I want to be prepared for the future. But as you can see in the XHTML validator, there are some thingies that don't work as I am used to as in HTML:
Line 34, column 49: there is no attribute "name"
This means I can't name my <form> tag? If I remove it, I can't use my javascript inputboxes check code.

Line 34, column 74: there is no attribute "onSubmit"
See above

Line 35, column 53: document type does not allow element "input" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "address", "fieldset" start-tag
I don't understand this???

Line 47, column 23: there is no attribute "onClick"
WTF? It doesn't mind the javascripting code in the beginning of the source, but it doesn't like me calling the js function???

If anyone can take a look at it and tell me what to do, thanks!
 
you have to use lowercase attributes, e.g. onsubmit not onSubmit

As for the name, try using id instead.
 
Hmm, OK. I changed all attributes to lowercase, it worked (thanks for that!), but the third problem remains :confused: And id doesn't work either :(
 
You have to change thejavascript, I forgot about this, with id:

document.forms['yourid'].name.value
document.forms['yourid'].shout.value
 
Another question: Why is the left and middle text misaligned (not at the top)? I can't see anything wrong in the code.
 
editted my post above about the js, I think its the form screwing your alignment up, add to your css

form { display: inline; }
 
This probably won't fix the test problem, but you need to move the <form></form> to out of the table, start it before the main table and close it after it.
 
You mean something like this:
Code:
<body>
<form bla=bla etc=etc>
<table name="main">
<tr><td>^3 (with another table within to align the <input> boxes)
</table>
</form>

Doesn't this break standards?
 
Glaanieboy said:
You mean something like this:
Code:
<body>
<form bla=bla etc=etc>
<table name="main">
<tr><td>^3 (with another table within to align the <input> boxes)
</table>
</form>

Doesn't this break standards?
Polite bump ;) :)
 
Hmm, it does validate, and now the stupid error is gone (can't remember what it was). So my site is now 100% XHTML compliant! :D But it didn't solve the aligning problem. It seems the table aligning the input textboxes in the right column could be the problem, since the left and middle text has (about) exactly the amount of blank space to the top as the input-boxes-table is high. Hmmmmmmm.
 
Very cool. I've been paying much more attention to validating my pages too, and the lack of capitalization tip I shall definitely keep in mind. I code in lowercase, but the Javascript I forget about!

On another note, is it even possible to W3C validate a page with Flash in it? I'll give you an example:

http://validator.w3.org/check?uri=http://www.xeidon.net

My own inkling says it's impossible, but I'd be interested in being proven wrong.

Melon
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back