Forum Moderators: open

Message Too Old, No Replies

Help with a script that works but with validation error.

         

Gemini23

5:21 pm on Apr 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi, Can anyone please help with a script that does work but has a validation error... from WC3
Error message is:
"required attribute "type" not specified
…search.php?fixed=1&amp;hidelabels=1"></script></div>!"

The actual script in an xhtml document is:
<div class="findme">
<h2>Find Me ... </h2>
<script src="...greenwidget.com/widget_search.php?fixed=1&amp;hidelabels=1"></script></div>

the document type is:
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

any suggestions?

Thanks :)

whoisgregg

6:13 pm on Apr 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Since it's possible for there to be other script languages, the validator requires what type of script it is to be set:

<script src="/path/to/script.js" type="text/javascript"></script>

Gemini23

7:08 pm on Apr 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks for that whoisgregg... I have tried adding the type="text/javascript" but it has created more errors...

the search box leads to a subdomain page with search options... (set by a third party) can I establish what coding I need to enter from the source code of that page?

part of it is..
<script language="javascript" src="coolmenupro.js"></script>
<script language="javascript" src="prototype.js"></script>
<script language="javascript" src="V3_functions.js"></script>
<style type="text/css">@import "styles/V3_default.css";</style>

Gemini23

7:23 pm on Apr 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi again whoisgregg,... NOT by trial and error but following your advice... I think I have found the type... thanks for advice...
type='text/javascript'>

Many Many thanks!

[edited by: Gemini23 at 7:32 pm (utc) on April 25, 2009]

whoisgregg

8:10 pm on Apr 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The subject of Javascript validation has also come up in a different thread, you may want to take a look to see if any of the info posted there is helpful. :)

[webmasterworld.com...]