SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Validation Errors - Help - Don't know how to fix!

    I am having problems understanding how to fix the errors in my page. The document is 4.01 transititional - i previously converted to xhmtl but it does not display properly in Netscape 6; consequently, I converted it back to 4.01 transitional. The problem lies in the rollovers - the errors are as follows:

    Below are the results of attempting to parse this document with an SGML parser.

    Line 61, column 48: an attribute specification must start with a name or name token (explain...).
    onMouseOver=document.menu_item_1.src=bullet_on_2.src;
    ^
    Line 71, column 53: an attribute specification must start with a name or name token (explain...).
    <td><a onMouseOver=document.menu_item_2.src=bullet_on_1.src;
    ^
    Line 82, column 48: an attribute specification must start with a name or name token (explain...).
    onMouseOver=document.menu_item_3.src=bullet_on_2.src;
    ^
    AND SO ON FOR THE CODE. If anyone could check through this and let me know what i could add and where to fix this i would appreciate it. I don't know enough about JavaScript to fix it on my own. Thanks

    and here is the code for the page:



    1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    2: <html><head><title>Call-Us Info Client Area</title>
    3: <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
    4: <script language="JavaScript" type="text/javascript">
    5: <!-- Hide script from old browers
    6: if (document.images) {
    7:
    8: bullet_on_1 = new Image
    9: bullet_off_1 = new Image
    10: bullet_on_1.src = "clients_files/bullet_on_1.gif"
    11: bullet_off_1.src = "clients_files/bullet_off_1.gif"
    12:
    13: bullet_on_2 = new Image
    14: bullet_off_2 = new Image
    15: bullet_on_2.src = "clients_files/bullet_on_2.gif"
    16: bullet_off_2.src = "clients_files/bullet_off_2.gif"
    17:
    18: }
    19: else {
    20:
    21: }
    22: // end hiding script from old browsers -->
    23: </script>
    24: <link href="clients_files/mainstyle.css" type="text/css" rel="stylesheet">
    25: <style type="text/css">
    26: body { margin:0;
    27: padding:0;
    28: }
    29:
    30: #clients { float:left;
    31: padding-right: 5px;
    32: padding-bottom: 5px;
    33: }
    34:
    35: </style>
    36: </head>
    37: <body>
    38: <table cellspacing="0" cellpadding="0" width="100%" border="0" summary="main body"><!--DWLayoutTable-->
    39: <tbody>
    40: <tr>
    41: <td valign=top><!-- menu column start-->
    42: <table cellspacing="0" cellpadding="0" width="100%" border="0"
    43: summary="main body">
    44: <tbody>
    45: <tr>
    46: <td colspan=2><img height=66 alt=map src="clients_files/map.gif"
    47: width=140 border="0"></td></tr>
    48: <tr>
    49: <td colspan=2><img height=54 alt="image"
    50: src="clients_files/spacer.gif" width=1 border="0"></td></tr>
    51: <tr>
    52: <td colspan=2><img height=1 alt="image"
    53: src="clients_files/spacer_white.gif" width=140 border="0"></td></tr>
    54: <tr>
    55: <td colspan=2><img height=21 alt="image"
    56: src="clients_files/spacer.gif" width=1 border="0"></td></tr>
    57: <tr>
    58: <td><img height=15 alt="image" src="clients_files/bullet_off_2.gif"
    59: width=31 border="0" name=menu_item_1></td>
    60: <td bgcolor="#1f3164"><a
    61: onMouseOver=document.menu_item_1.src=bullet_on_2.src;
    62: style="COLOR: "#ffffff"; text-decoration: none"
    63: onMouseOut=document.menu_item_1.src=bullet_off_2.src
    64: href=index.html">Home</a></td></tr>
    65: <tr>
    66: <td colspan=2><img height=4 alt="image" src="clients_files/spacer.gif"
    67: width=1 border="0"></td></tr>
    68: <tr>
    69: <td><img height=15 alt="image" src="clients_files/bullet_off_1.gif"
    70: width=31 border="0" name=menu_item_2></td>
    71: <td><a onMouseOver=document.menu_item_2.src=bullet_on_1.src;
    72: style="COLOR: "#ffffff"; text-decoration: none"
    73: onMouseOut=document.menu_item_2.src=bullet_off_1.src
    74: href=company.html">Company</a></td></tr>
    75: <tr>
    76: <td colspan=2><img height=4 alt="image" src="clients_files/spacer.gif"
    77: width=1 border="0"></td></tr>
    78: <tr>
    79: <td><img height=15 alt="image" src="clients_files/bullet_off_2.gif"
    80: width=31 border="0" name=menu_item_3></td>
    81: <td bgcolor="#1f3164"><a
    82: onMouseOver=document.menu_item_3.src=bullet_on_2.src;
    83: style="COLOR: "#ffffff"; text-decoration: none"
    84: onMouseOut=document.menu_item_3.src=bullet_off_2.src
    85: href=solutions.html">Solutions</a></td></tr>
    86: <tr>
    87: <td colspan=2><img height=4 alt="image" src="clients_files/spacer.gif"
    88: width=1 border="0"></td></tr>
    89: <tr>
    90: <td><img height=15 alt="image" src="clients_files/bullet_off_1.gif"
    91: width=31 border="0" name=menu_item_4></td>
    92: <td><a onMouseOver=document.menu_item_4.src=bullet_on_1.src;
    93: style="COLOR: "#ffffff"; text-decoration: none"
    94: onMouseOut=document.menu_item_4.src=bullet_off_1.src
    95: href=services.html">Services</a></td></tr>
    96: <tr>
    97: <td colspan=2><img height=4 alt="image" src="clients_files/spacer.gif"
    98: width=1 border="0"></td></tr>
    99: <tr>
    100: <td><img height=15 alt="image" src="clients_files/bullet_off_2.gif"
    101: width=31 border="0" name=menu_item_5></td>
    102: <td bgcolor="#1f3164"><a
    103: onMouseOver=document.menu_item_5.src=bullet_on_2.src;
    104: style="COLOR: "#ffffff"; text-decoration: none"
    105: onMouseOut=document.menu_item_5.src=bullet_off_2.src
    106: href=contact.html">Contact</a></td></tr>
    107: <tr>
    108: <td colspan=2><img height=4 alt="image" src="clients_files/spacer.gif"
    109: width=1 border="0"></td></tr>
    110: <tr>
    111: <td><img height=15 alt="image" src="clients_files/bullet_off_1.gif"
    112: width=31 border="0" name=menu_item_6></td>
    113: <td><a onMouseOver=document.menu_item_6.src=bullet_on_1.src;
    114: style="COLOR: "#ffffff"; text-decoration: none"
    115: onMouseOut=document.menu_item_6.src=bullet_off_1.src
    116: href=employment.html">Employment</a></td></tr>
    117: <tr>
    118: <td colspan=2><img height=4 alt="image" src="clients_files/spacer.gif"
    119: width=1 border="0"></td></tr>
    120: <tr>
    121: <td><img height=15 alt="image" src="clients_files/bullet_off_2.gif"
    122: width=31 border="0" name=menu_item_7></td>
    123: <td bgcolor="#1f3164"><a
    124: onMouseOver=document.menu_item_7.src=bullet_on_2.src;
    125: style="COLOR: "#ffffff"; text-decoration: none"
    126: onMouseOut=document.menu_item_7.src=bullet_off_2.src
    127: href=clients.html">Clients</a></td></tr>
    128: <tr>
    129: <td colspan=2><img height=4 alt="image" src="clients_files/spacer.gif"
    130: width=1 border="0"></td></tr>
    131: <tr>
    132: <td><img height=15 alt="image" src="clients_files/bullet_off_1.gif"
    133: width=31 border="0" name=menu_item_8></td>
    134: <td><a onMouseOver=document.menu_item_8.src=bullet_on_1.src;
    135: style="COLOR: "#ffffff"; text-decoration: none"
    136: onMouseOut=document.menu_item_8.src=bullet_off_1.src
    137: href=interviewers.html">Interviewers</a></td></tr>
    138: <tr>
    139: <td colspan=2><img height=19 alt="image"
    140: src="clients_files/spacer.gif" width=1 border="0"></td></tr>
    141: <tr>
    142: <td colspan=2><img height=1 alt="image"
    143: src="clients_files/spacer_white.gif" width=140 border="0"></td></tr>
    144: <tr>
    145: <td class=grey78 valign=bottom colspan=2><br><a
    146: href="http://www.casro.org/"><img height=60 alt=casro
    147: src="clients_files/casro.gif" width=134 border="0"></a>
    148: <br><br><br>&nbsp; </td></tr>
    149: <tr>
    150: <td><img height=1 alt="image" src="clients_files/spacer.gif" width=31
    151: border="0"></td>
    152: <td><img height=1 alt="image" src="clients_files/spacer.gif" width=109
    153: border="0"></td></tr></tbody></table><!-- menu column end--></td>
    154: <td valign=top bgcolor="#ffffff"><img height=309 alt="image"
    155: src="clients_files/spacer_white_top.gif" width=1 border="0"></td>
    156: <td valign=top>
    157: <table cellspacing="0" cellpadding="0" width="100%" border="0"
    158: summary="main body">
    159: <tbody>
    160: <tr>
    161: <td><img height=66 alt=logo src="clients_files/title.jpg" width=318
    162: border="0"></td>
    163: <td><img height=66 alt=topblue src="clients_files/title_right.gif"
    164: width=127 border="0"></td>
    165: <td><img height=66 alt=solutions src="clients_files/phonetemp.gif"
    166: width=173 border="0"></td></tr>
    167: <tr>
    168: <td valign=top colspan=3><!-- title table start -->
    169: <table cellspacing="0" cellpadding="0" width="100%" border="0"
    170: summary="main body">
    171: <tbody>
    172: <tr>
    173: <td bgcolor="#2af0ff"><img height=15 alt="image"
    174: src="clients_files/spacer.gif" width=1 border="0"></td>
    175: <td class=black78
    176: bgcolor="#2af0ff">|&nbsp;&nbsp;&nbsp;<b>C&nbsp;L&nbsp;I&nbsp;E&nbsp;N&nbsp;T&nbsp;&nbsp;&nbsp;&nbsp;A&nbsp;R&nbsp;E&nbsp;A&nbsp;&nbsp;&nbsp;|</b></td></tr>
    177: <tr>
    178: <td bgcolor="#ffffff"><img height=1 alt="image"
    179: src="clients_files/spacer.gif" width=58 border="0"></td>
    180: <td bgcolor="#ffffff"><img height=1 alt="image"
    181: src="clients_files/spacer.gif" width=550
    182: border="0"></td></tr></tbody></table><!-- title table end --></td></tr>
    183: <tr>
    184: <td valign=top colspan=3><!-- body start -->
    185: <table cellspacing="0" cellpadding="0" width="100%" border="0"
    186: summary="main body">
    187: <tbody>
    188: <tr>
    189: <td colspan=3><img height=10 alt="image"
    190: src="clients_files/spacer.gif" width=1 border="0"></td></tr>
    191: <tr>
    192: <td><img height=313 alt="image" src="clients_files/spacer.gif"
    193: width=5 border="0"></td>
    194: <td valign=top align=left bgcolor="#001850">
    195: <div id="clients"><img src="clients_files/clientsimage.jpg" height=204 alt="clients"
    196: width=215></div>
    197: <h5><span style="color: #ffbf00">Call-Us Info wishes a happy
    198: and safe holiday season to all of our Clients and a prosperous
    199: New Year!</span></h5></td>
    200: <td><img height=1 alt="image" src="clients_files/spacer.gif"
    201: width=5 border="0"></td></tr>
    202: <tr>
    203: <td><img height=1 alt="image" src="clients_files/spacer.gif"
    204: width=5 border="0"></td>
    205: <td><img height=1 alt="image" src="clients_files/spacer.gif"
    206: width=130 border="0"></td>
    207: <td><img height=1 alt="image" src="clients_files/spacer.gif"
    208: width=5
    209: border="0"></td></tr></tbody></table><!-- body end --></td></tr></tbody></table></td>
    210: <td
    211: style="BACKGROUND-IMAGE: url(index_files/bg_right_column.gif); BACKGROUND-REPEAT: repeat-y"
    212: width="100%"><img height=34 alt="image" src="clients_files/spacer.gif"
    213: width=3 border="0"></td></tr>
    214: <tr>
    215: <td><img height=8 alt="image" src="clients_files/spacer.gif" width=140
    216: border="0"></td>
    217: <td bgcolor="#ffffff"><img height=1 alt="image" src="clients_files/spacer.gif"
    218: width=1 border="0"></td>
    219: <td bgcolor="#2af0ff"><img height=1 alt="image" src="clients_files/spacer.gif"
    220: width=618 border="0"></td>
    221: <td
    222: style="BACKGROUND-IMAGE: url(index_files/bg_right_column.gif); BACKGROUND-REPEAT: repeat-y"><img
    223: height=1 alt="image" src="clients_files/spacer.gif" width=11 border="0"></td></tr>
    224: <tr>
    225: <td height=1><img height=1 alt="image" src="clients_files/spacer.gif"
    226: width=140></td>
    227: <td><img height=1 alt="image" src="clients_files/spacer.gif" width=1></td>
    228: <td><img height=1 alt="image" src="clients_files/spacer.gif" width=618></td>
    229: <td></td></tr></tbody></table></body></html>

  2. #2
    SitePoint Member
    Join Date
    Jul 2003
    Location
    Belgium
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not familiar with onMouse-actions but after removing them from your anchors (line 60-64) folowing remains:

    <a style="COLOR: "#ffffff"; text-decoration: none" href=index.html">

    two mistakes: the " around the color and a mising " for the location. Correct line should be

    <a style="color: #ffffff; text-decoration: none" href="index.html">

    I took a quick look at ther other errors, and assume the same problem.

  3. #3
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    change your onMouseOver, onMouseOut etc to all lowercase onmouseover, onmouseout etc
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  4. #4
    SitePoint Member
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your help! I fixed the errors with the quotation marks, but I still get the same error:

    Line 71, column 53: an attribute specification must start with a name or name token (explain...).
    <td><a onMouseOver=document.menu_item_2.src=bullet_on_1.src;
    ^
    If anyone else knows how to fix this so the document validates as HTML 4.01, i would appreciate it.

  5. #5
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,015
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    put quotes around the attribute values

    you have <a x=y=z ... which is invalid html

    it should be <a x="y=z" ...

    i.e. <a onMouseOver=
    "document.menu_item_2.src=bullet_on_1.src" ...
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  6. #6
    SitePoint Member
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks to everyone for all of your help, especially Rudy! My page now validates as 4.01 transitional. I wasn't sure where to put the missing quotations marks and now I have it! Again, thanks so kindly.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •