UBB.Dev
Posted By: Zackary Question about XHTML compliance - 08/21/2003 7:11 AM
Wasn't sure which forum to post this in, figured here was a safe start.

I'm just getting into the whole XHTML validation thing, having officially "certified" my search addon template tonight, (and after seeing the results, I'm going to go back and validate all the other pages I've built as addons for my site ).

One of the errors it gave was on my closing </form> tag for the search form.

Now, I admit, I'm self taught in all my HTML, PHP, Perl coding, actually took two semesters of C++ when I was in college, (forgotten more than I care to admit about C++, but it's helped me with my PHP and Perl coding), and as I was learning these languages, having closing tags was always reinforced.

So, why would the validator require me to remove the closing tag, stating that no form is open when there is indeed a form opened?

Anyways, if anyone could just give a brief synopsis of why this is now appropriate, where it once wasn't, I'd be greatly appreciative.

Thanks all.
Posted By: AllenAyres Re: Question about XHTML compliance - 08/21/2003 8:24 AM
Congrats on taking the plunge

If you could post a link to it, it'd be easier to diagnose Most likely you had either 2 closing tags or the closing tag you had was on the wrong side of some other code and the validator didn't see it where it was supposed to be
Posted By: JustDave Re: Question about XHTML compliance - 08/21/2003 8:46 AM
Food for thought:

http://www.hixie.ch/advocacy/xhtml
Posted By: Zackary Re: Question about XHTML compliance - 08/21/2003 3:42 PM
I scanned the document multiple times for instances of <form> and </form> and there was only one of each.

Perhaps the order of the table tags was throwing it off.

What I do know is, that once I removed the ending form tag, the page validated. Which I found odd and led me to post this.

[EDIT: Link for Allen, here.]
Posted By: Zackary Re: Question about XHTML compliance - 08/21/2003 3:46 PM
My head hurts after reading that Dave.

So a question, if XHTML isn't working "properly" or people are using it incorrectly, why the push for XHTML validated files?

Perhaps I should just stick to the HTML 4.01 that I know works?

I don't know. I do think that I'll put my closing tag back in, as that makes "sense" to me. Even though the page works without it.

I do need to get my test box up and running again and run the page through some other browsers to make sure it displays properly.

Too much to think about, too early in the morning... need more caffiene.

Thanks!
Posted By: JustDave Re: Question about XHTML compliance - 08/21/2003 6:40 PM
.threads outputs with a doctype of XHTML 1.0 transitional which being transitional is somewhat more forgiving than using strict. After reading way more than I cared to about various issues caused by using the XHTML doctypes including much debate by some popular authors on the net I have decided to use the HTML 4.01 strict type myself for other projects.
Posted By: AllenAyres Re: Question about XHTML compliance - 08/21/2003 7:10 PM
Here's a couple of easy-reading articles on the benefits of xhtml:


http://www.alistapart.com/stories/betterliving/ - a must read

http://www.alistapart.com/stories/seo/

Should make a lot more sense then
Posted By: AllenAyres Re: Question about XHTML compliance - 08/21/2003 7:14 PM
and post a link to your problem page zackary, it's prolly something another pair of eyes could catch easily
Posted By: JustDave Re: Question about XHTML compliance - 08/21/2003 8:15 PM
Allen have you heard of any problems with .threads using XHMTL 1.0 transitional? Mark Pilgrim (more) had some things to say about xhtml but on the other side Zeldman states he has done many sites with xhtml/css without problems.

Zackary here's AlistApart's index of HTML/XHTML information below.



LoL I'm starting to think that there are *to many* standards around...

Posted By: Zackary Re: Question about XHTML compliance - 08/21/2003 11:33 PM
I agree Dave... too many standards.

I'll read through all the links provided when I get home tonight. Or try anyhow.

Allen, the link I posted is the link to my test site, running the user search add on... I'm not sure how to link it into the validator to post that link.

I grabbed the file from my site at lunch and went over it again, changing it back to the "invalid" state, according to the validator.

*shrug*

Thanks for the info!

[EDIT: Gee whiz, I'm smart, I linked you to an invalid page before. This is the CORRECT URL http://softest.sofguild.com/threads/searchmembers.php ]

[EDIT 2: DUH, ok, this is the link to the validator that will load my page, with the error. Click Me! I'll just go away now. ]
Posted By: Zackary Re: Question about XHTML compliance - 08/22/2003 4:18 AM
Good info guys, thanks for the links.
Posted By: AllenAyres Re: Question about XHTML compliance - 08/24/2003 3:29 AM
ok, here's the problem, you're telling the validator that you're closing the form tag when you use this code:

<form method="get" action="searchmembers.php" />

change to this:
<form method="get" action="searchmembers.php">

and you'll be fine.

One thing you may consider so the page will look ok in Mac IE is to push those form tags to outside the <table> </table> they're in - you've got them kinda randomly inside some td tags - Mac IE doesn't usually handle that well.
Posted By: Zackary Re: Question about XHTML compliance - 08/24/2003 6:04 AM
I'll look at that Allen. But it errored out on the open tag without the / there. So that's why it's there. hehe

I'll also look at the table thing, thanks for the advice. I only know one of my users who is a Mac user, but I try to please everyone, especially now that this will be a mod I'll be posting here.
Posted By: AllenAyres Re: Question about XHTML compliance - 08/24/2003 6:21 AM
ok, when I pulled that extra / out it passed validation
Posted By: Zackary Re: Question about XHTML compliance - 08/24/2003 7:47 AM
*shrug* I've added a ton of stuff, but will remember that when I send it through validation again.

Thanks!
Posted By: Anno Re: Question about XHTML compliance - 12/18/2003 2:17 PM
>Perhaps I should just stick to the HTML 4.01 that I know works?

The current version doesn´t validate to...anything basicaly.
For instance this page
https://www.ubbdev.com/forum/postlist.php/Cat/0/Board/modsuggestions

with forced html 4.01 transitional validates with 20 errors.
http://validator.w3.org/check?uri=http%3...01+Transitional
Posted By: AllenAyres Re: Question about XHTML compliance - 12/18/2003 9:19 PM
it's due to the visitor tracking app at the bottom of every page - we can't fix it, or at least we can fix it but josh keeps putting the non-compliant version in when we update

hmmm... at least partially.. looks like a template from a beta with xhtml errors either didn't get put into the final version or josh needs to check on it - a plethora number of bugs are there
Posted By: JoshPet Re: Question about XHTML compliance - 12/18/2003 9:58 PM
Ah - Thanks allen -

You fixed up that code for me, but you're right, I don't have it there. Will get it fixed up.

You're right, if it's hosed up - every page is invalid.
© UBB.Developers