16 replies [Last post]
babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 12 years 43 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

Hi

I have a couple of scripts on my site that is causing it to fail validation. I have read somewhere that they should be outsourced, but have no idea how that is done! Can somebody help me on this please?

Script 1

Script 2



Thanks
Jill

-------
Jill

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 7 weeks 3 days ago
Joined: 2004-06-30
Posts: 9674
Points: 810

babrees wrote:I have a

babrees wrote:
I have a couple of scripts on my site that is causing it to fail validation.

Any chance you could post the validation errors? Wink

Verschwindende wrote:
  • CSS doesn't make pies

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 12 years 43 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

There are 16 errors, all to

There are 16 errors, all to do with the two scripts. This is the URL that I am working on: http://www.123club.co.uk/default/

Warning Line 27, Column 90: cannot generate system identifier for general entity "condition".
…ub.co.uk/default/search.php?filled=1&condition=and" method="post"

Error Line 27, Column 90: general entity "condition" not defined and no default entity
…ub.co.uk/default/search.php?filled=1&condition=and" method="post"

Warning Line 27, Column 99: reference not terminated by REFC delimiter.
…default/search.php?filled=1&condition=and" method="post"

Warning Line 27, Column 99: reference to external entity in attribute value.
…default/search.php?filled=1&condition=and" method="post"

Error Line 27, Column 99: reference to entity "condition" for which no system identifier could be generated.
…default/search.php?filled=1&condition=and" method="post"

Error Line 29, Column 51: end tag for "input" omitted, but OMITTAG NO was specified.
input type="hidden" name="whichtype" value=""

Warning Line 44, Column 64: cannot generate system identifier for general entity "asinsearch".
…23club.co.uk/cgi-bin/books.pl?script&asinsearch=mylist:2&grid=c:1,r:1,p,b,u

Error Line 44, Column 64: general entity "asinsearch" not defined and no default entity.
…23club.co.uk/cgi-bin/books.pl?script&asinsearch=mylist:2&grid=c:1,r:1,p,b,u"

.........and more of similar!

-------
Jill

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

For example, line 44:

For example, line 44:


should be

type="text/javascript"

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.

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 12 years 43 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

Thanks Gary - I had just

Thanks Gary - I had just changed that actually But that has nothing to do with the validation failing Sad

-------
Jill

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 7 weeks 3 days ago
Joined: 2004-06-30
Posts: 9674
Points: 810

You have to replace every

You have to replace every instance of & with &

Verschwindende wrote:
  • CSS doesn't make pies

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 12 years 43 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

thepineapplehead wrote:You

thepineapplehead wrote:
You have to replace every instance of & with &

Thanks! That fixed most of them and I managed to sort the others, page is now transitional :thumbsup:

Jill
(just over an hour away from Milton Keynes!)

-------
Jill

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

Now change the DTD to a

Now change the DTD to a 'Strict' version as it should be or is this an old document that is being transitioned from Quirks to Standards mode?

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

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 12 years 43 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

Thanks Hugo! I have to

Thanks Hugo!

I have to admit I just let Dreamweaver do the doctype for me. I looked at the link in your post, but tbh am still not sure of the exact wording to use. Can you help me by telling a poor dumb blonde exactly what she needs to put?

Thanks!

-------
Jill

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 12 years 43 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

Is this correct?

Is this correct?

-------
Jill

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 12 years 43 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

Is this

:bigoops:

Is this correct?

-------
Jill

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 12 years 43 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

I tried that but now I

:shrug:

I tried that but now I have 47 errors!!!!!!!!!!!!

:curse:

-------
Jill

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 7 weeks 3 days ago
Joined: 2004-06-30
Posts: 9674
Points: 810

First of all get a space in

First of all get a space in the DTD:

then could you either post all the code you're using here or update your live page to reflect the new doctype?

Verschwindende wrote:
  • CSS doesn't make pies

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 12 years 43 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

Thanks. Sorry, I put it

Thanks.

Sorry, I put it back whilst working and forgot to change it back to strict!

I've done that now. http://www.123club.co.uk/default/

There are some whereby I have font size in the page, which it doesn't like, so I can move that to my css file. But the others I don't know how to correct.

Jill

-------
Jill

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

Using strict does mean

Using strict does mean observing certain deprecated elements and attributes, even if not using 'Strict' the use of the font tag has long since been redundant, and simply must never be used, it's presentational and font-size is purely controlled from CSS, the same goes for the border attribute, replace it with the 'border' property on the element in question but in your stylesheet.

forms: forms cannot have inline controls ( input tag ) as a direct child, correctly written you should be using the fieldset element to wrap and group your form controls (inputs & labels) and use the 'legend' tag to provide a title to that fieldset and it's controls. the use of the <br /> tag to force a newline between inputs is also incorrect if you need the inputs on separate lines then set them to display:block or float:left;clear:left.

Further instances of attributes such as 'align' should again be controlled through CSS properties.

An anchor used as a submit in a form should probably be replaced by a input of type="submit" also you can't have naked text ( 'Welcome Guest') after the form tag wrap it a paragraph tag or some suitable block element.

There is an instance of a missing closing slash on an img tag.

'width' attribute on the table again should be replaced by css properties.

It would probably be a good idea to have a quick read through some basic form tutorials such as the ones that can be found at htmlDog,
you need to be using the 'label' element in your forms even if you choose to hide them from general screen rendering (permitted as screen readers will still make use of it as is the case for the legend element)

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

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 12 years 43 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

oh dear, all in all I've

oh dear, all in all I've made a pretty poor job :blushing:

Thank you so much for your time in helping - it REALLY is appreciated. I can see that it's going to take me some time to get my head around this new info.

I've got to get on with some other stuff right now, but shall certainly take your info and go into it more as soon as I can.

Thank you both so much once again. I expect I'll be back with more questions

Jill

-------
Jill

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

No you haven't made a poor

No you haven't made a poor job, it's more that there are some issues of finer detail that you need to become familiar with, but they are not hugely complicated. Form input controls ('input', 'select',) have an associated label tag that identifies the input with text for both screen rendering and screen readers they have an associated 'for' attribute that ensures that there is an explicit association between pairs by linking the 'for' and ID identifier on the input using the same name/value. fieldset is simply a grouping element that should hold all the form elements and that can occur more than once if one wishes to divide up complicated forms into logical groups of related controls, it - by default - has a border and ought to have the legend element set so that you can 'label' the fieldset group i.e 'address details' if any of these elements upsets the visual design/layout they can be hidden, fieldsets can have there borders removed, the other two set to display:none;

All the element attributes are easily dealt with through CSS and should not present any major problems, if they do ask and someone will help.

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