[thelist] Need Help Validating

Tim Burgan email at timburgan.com
Tue Nov 2 03:23:40 CST 2004

Aaron Cole wrote:

> The first issue has to do with the image type used in place of submit 
> in the search form.  Has the image type been depreciated?  If so, how 
> can I use an image in place of the standard HTML submit button?

XHTML does not support the attributes "width" and "height" for the image 
tag. To fix this you need to specify the height and width in your CSS.

If you want you COULD do this in-line

   e.g. <img style="width: 22px; height: 17px;"/>

or in your CSS:

   e.g.  img {
           width: 22px;
           height: 17px;

> The other problem is with the javascript I'm using to rotate the set 
> of images in the middle of the page.  We have four sets of images that 
> need to rotate.  I have a javascript that outputs a number between 0-3 
> and then adds to the class name of the section.  My stylesheet then 
> determines which image to display based off of the class.

My GUESS is that this is something to do with CDATA [1]. To fix this 
either put your javascript as and external file, or add CDATA comments. 
E.g. [2]

<script type="text/javascript">

  // put your code here


'//' At the start of a line marks a Javascript comment, which prevents 
the '<![CDATA[' and ']]>' from being parsed by the script.

[1] <http://tinyurl.com/4ltxk>
[2] <http://en.wikipedia.org/wiki/Javascript>

> The validator coughs up a lung when it gets to the javascript in 
> question.  Is there a better way to get this random image effect?

It should be OK if you make the changes above.

Hope that helps.



Tim Burgan.
Website Development & Graphic Design

E <email at timburgan.com>
W <www.timburgan.com>

More information about the thelist mailing list