9 replies [Last post]
randomguy132
randomguy132's picture
Offline
Enthusiast
NYC
Last seen: 16 years 6 days ago
NYC
Timezone: GMT-5
Joined: 2005-03-02
Posts: 69
Points: 0

Having many problems, all of which I don't know how to fix.

Link to XHTML: http://georgio.pcplayground.com/
Link to validation results: http://validator.w3.org/check?uri=http%3A%2F%2Fgeorgio.pcplayground.com%2F&charset=%28detect+automatically%29&doctype=%28detect+automatically%29&ss=1

1) The section providing the most errors is my chatterbox (http://chatter.flooble.com/).

The code is:

<script language="javascript"> var chatterbox = 'no'; </script>
<script language="javascript" src="http://chatter.flooble.com/chatter.php?js=true&id=randomguy132&sid=1465763">
</script><noscript>
<a href="http://chatter.flooble.com/chatter.php?id=randomguy132&sid=1465763&popup=true&w=480&h=400" 
target="flooblechatterbox" 
onClick="window.open

('about:blank','flooblechatterbox','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no

,copyhistory=no,width=480,height=400');return true;">
<img src="http://img.flooble.com/images/chatter/chaticon.gif" border="0" 
align="absbottom">Talk</a> 
in my <a href="http://chatter.flooble.com/">flooble chatterbox, a free javascript chat tag board / shoutbox / tagboard 

program for your xanga, diary, blogger or weblog</a> | 
</noscript>
<script language="javascript"> if (!chatterbox || chatterbox != 'ok') { 
document.write('This <a href="http://chatter.flooble.com/">flooble chatterbox</a> is');
document.write(' temporarily unavailable. It will be back up shortly.'); } </script></div>

That encompasses more than half of my errors in the validator.

The second problem is my freefind search bar. (http://www.freefind.com/)

The code is:

<form action="http://search.freefind.com/find.html" method="get" target="_blank">
<input type="hidden" name="id" value="14774905">
<input type="hidden" name="pageid" value="r">
<input type="hidden" name="mode" value="all">
<input type="hidden" name="n" value="0">
<input type="text" name="query" size="15"> 
<input type="submit" value=" Find "><br />
</form>

And my third problem are the first 8 errors listed in the validation.
I just don't know what they want me to change.

Thanks for any help,

-Will[/code]

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 8 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Need help with XHTML validation.

Will,
You need to start going through things bit by bit fixing up an error then re-valadating as you go as often reported errors are cumulative from one primary error and will vanish once you fix up the primary cause.

You need to pay attention to things like quotes, make sure your coding syntax is correct and that you haven't left out a quote where you need one and where you have an ampersand in a url it needs to be escaped with &amp;

Slightly more worrying is the way that you are using the heading tags as containers, this isn't correct they are not really divisional elements they are used to convey a heading text to a section and you really need to change all of them to divs into which you may use the headings to title each div if wished.
Have a look at what your page looks like without the styles to control presentation, the default properties of the headings are restored and your text is jumping all over the place in size especially with the bottom right hand links which you are styling to be small yet are using an h1 tag for them so that they become the largest text item in the page when unstyled.

Change all instances of h# to divs .

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

randomguy132
randomguy132's picture
Offline
Enthusiast
NYC
Last seen: 16 years 6 days ago
NYC
Timezone: GMT-5
Joined: 2005-03-02
Posts: 69
Points: 0

Need help with XHTML validation.

Thanks a lot, I'll worry more about the validation once I get all that taken care of.

First I changed all the h# tags to plain old div tags.
Then I saw how it looked, and gradually replaced the h# references within the CSS file with .whatever, and added class="whatever" to the divs.

It works out much better, I'm not entirely sure why it would do that, but it's not important.

The page where this is hosted is:
http://georgio.pcplayground.com/

I'll get back to the validation later, but for now I have a lot of recoding to do as my whole site is like this...

Thanks again,

-Will

Edit: Well I've done all the changes, if you could take a look at it now, that would be great, thanks a lot,

-Will

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 3 days 15 hours ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Need help with XHTML validation.

You have the same errors repeated, for the most part.

Replace every ampersand (&) that appears in text or in a link with &amp; There are four characters that have special meaning in html and should not be used in text (pcdata) as typed, but rather as character entities. These are the ampersand (&), the less than symbol (<), the greater than symbol (>), and the quote ("). They should be replaced by &amp;, &lt;, &gt;, and &quot; respectively. Substitute the entities in your various links, and that will get rid of 30–35 errors.

The target attribute is deprecated in html4. Instead of this,

  
<a href="http://chatter.flooble.com/chatter.php?id=randomguy132&sid=1465763&popup=true&w=480&h=400"   
target="flooblechatterbox"   
onClick="window.open('about:blank',  
    'flooblechatterbox',  
    'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=480,height=400');    
return true;">
Do this
  
<a href="http://chatter.flooble.com/chatter.php&amp;id=randomguy132&amp;sid=1465763"   
onclick="return !window.open(this.href,    
    'flooblechatterbox',  
    'scrollbars=yes,width=480,height=400');">
Notice all &s replaced by &amp; Notice, too, that 'onclick' is all lowercase. All event handler names are lowercase. If the window.open() method has a third argument, the window attributes, all attributes are turned off. It is only necessary to list the ones you want to be 'on'.

A form may only contain block level elements. <input>s are inline. Use a <fieldset> (semantic) or a <div> (non-semantic) to hold the <input>s. See this form for an example.

OK, get that, then come back for more Smile

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

randomguy132
randomguy132's picture
Offline
Enthusiast
NYC
Last seen: 16 years 6 days ago
NYC
Timezone: GMT-5
Joined: 2005-03-02
Posts: 69
Points: 0

Need help with XHTML validation.

Thanks, so far this is pretty much doing the trick.
Just six more errors.

Could you explain to me the format of the replacement method of target? Specifically pertaining to opening new windows?

That's the big one left, but there are a couple more in there that you can see.

Many many thanks thus far,

-Will

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 3 days 15 hours ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Need help with XHTML validation.

Wow! Big diff, huh?

line 105: A p can't contain a block element like div. I don't see any reason for the p tag, remove it and put the class on the div.

line 112: I think that'll fix itself when you fix 105.

line 124: Same as 105. A p can't contain a block element (form). Lose the p tags.

line 124: I don't know off hand how you'd handle opening your form's script page in a new window. I suspect it would be done from the submit button.

line 147: You have

<a href="http://georgio.pcplayground.com/willandbeyond.rss" target="_blank">http://georgio.pcplayground.com/willandbeyond.rss</a> 
You'll rewrite it as;
<a href="http://georgio.pcplayground.com/willandbeyond.rss"
   onclick="return !window.open(this.href);">...</a>
You're saying; when clicked, return the negated results of opening a new window using this object's href attribute as the source. If the javascript is successful, it returns 'true' which is negated (!) so the html link doesn't fire. Click == false, never happened.

If the javascript fails, it returns 'false' which is negated and the html link fires. Click == true, activate link.

If javascript isn't there or is turned off, the html link just acts normally.

The open() method takes up to four arguments. The first is the src or url. In this case, we used an object's variable, this.href, so it's not quoted. Else, it would be.

The second argument is the name of the new window. If a window is already open with the same name, the content is replaced by the new src.

The third argument contains the window's attributes. These attributes are on by default. If even one is included as an argument, all of them default to off. That's why you only need to list the ones you want on.

The fourth is an IE only flag related to the global history.

You're almost there, enjoy.

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

randomguy132
randomguy132's picture
Offline
Enthusiast
NYC
Last seen: 16 years 6 days ago
NYC
Timezone: GMT-5
Joined: 2005-03-02
Posts: 69
Points: 0

Need help with XHTML validation.

Thanks after much work, my entire site (well the pages I've converted to XHTML) are all validated...mostly.

Still 2 issues.
They seems to have gotten rid of support for <u> and <strike>.
How might I go about fixing this?

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 3 days 15 hours ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Need help with XHTML validation.

text-decoration: none | line-through | overline | underline | blink

Browsers generally ignore blink, and that's a Good Thing™.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 11 hours 15 min ago
Joined: 2004-06-30
Posts: 9669
Points: 805

Need help with XHTML validation.

Thanks to the fandabadoozy W3 Xhtml tag reference:

http://www.w3schools.com/tags/tag_del.asp

Quote:

The <del> tag

Definition and Usage

Defines text that has been deleted in a document.

Differences Between HTML and XHTML: NONE

Tips and Notes

Tip: Use it together with the <ins> tag to describe updates and modifications in a document.

You should use it with cite to give a link to why the document was changed.

Verschwindende wrote:
  • CSS doesn't make pies

randomguy132
randomguy132's picture
Offline
Enthusiast
NYC
Last seen: 16 years 6 days ago
NYC
Timezone: GMT-5
Joined: 2005-03-02
Posts: 69
Points: 0

Need help with XHTML validation.

Thank you all! My pages are now validated.
Now onto the CSS styling forum to deal with some other issues...