Pagina 1 di 3 1 2 3 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 23
  1. #1

    Validare codice con w3c

    ho provato a vilidare codice html e (a parte piccoli problemini risolvibili) ho dei seri problemi con il codice javascript presente all'interno della mia pagina web.

    anche mettendo il codice fra commenti non risolvo il problema, cosa posso fare? ciao grazie
    www.zukimania.org

  2. #2
    Forse non hai scritto il tipo di linguaggio e il contenuto all'interno del tag <script>. Posta il codice e la spiegazione del W3 all'errore.
    FEDERIX.IT - [Pillola] GRAFICA DEI FORM

    ...ho ancora quella forza che ti serve, quando dici "Si comincia!"

  3. #3
    questo [ quello che dice sugli script ecc. ecc.

    poi il resto non ve lo posto...


    Line 26, column 115: end tag for element "P" which is not open

    ...Mth[now.getMonth()] + " " + year+'</p>');

    The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

    If this error occured in a script section of your document, you should probably read this FAQ entry.



    Line 42, column 14: there is no attribute "ID"

    <script id="clientEventHandlersJS" language="javascript">

    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.



    Line 42, column 59: required attribute "TYPE" not specified

    <script id="clientEventHandlersJS" language="javascript">

    The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

    Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.



    Line 64, column 29: required attribute "TYPE" not specified

    <script language="Javascript">



    Line 75, column 51: required attribute "TYPE" not specified

    <div id="mondomotori"><script language="javascript">



    Line 77, column 138: end tag for element "A" which is not open

    ...lank">[img]'+uri+'[/img]</a>');



    Line 81, column 51: required attribute "TYPE" not specified

    <div id="magliette"><script language="javascript">



    Line 83, column 140: end tag for element "A" which is not open

    ...lank">[img]'+uri+'[/img]</a>');



    questo [ il pezzo di codice...


    26: document.write('

    '+nameDay[now.getDay()]+ ' ' + now.getDate() + " " + nameMth[now.getMonth()] + " " + year+'</p>');
    27:
    28: }



    42: <script id="clientEventHandlersJS" language="javascript">
    64: <script language="Javascript">
    65: <!--

    75: <div id="mondomotori"><script language="javascript">
    76: var uri = 'http://impit.tradedoubler.com/imp/img/9841/1014649?' + new String (Math.random()).substring (2, 11);
    77: document.write('[img]'+uri+'[/img]');

    81: <div id="magliette"><script language="javascript">
    82: var uri = 'http://impit.tradedoubler.com/imp/img/447983/1014649?' + new String (Math.random()).substring (2, 11);
    83: document.write('[img]'+uri+'[/img]');
    www.zukimania.org

  4. #4
    ...Mth[now.getMonth()] + " " + year+'</p>'); --> Prova a sostituire gli apici del </p> con le virgolette.

    <script id="clientEventHandlersJS" language="javascript"> --> l'attributo ID non esiste nel tag <script>

    <script id="clientEventHandlersJS" language="javascript"> --> devi mettere type="text/javascript" tra gli attributi

    [img]'+uri+'[/img]</a>'); --> c'è confusione tra virgolette e apici, elimina gli apici.
    FEDERIX.IT - [Pillola] GRAFICA DEI FORM

    ...ho ancora quella forza che ti serve, quando dici "Si comincia!"

  5. #5
    gli errori sono calati ma il discorso dell ID in javascript cosa faccio, se lo elimino funziona uguale la funzione?
    www.zukimania.org

  6. #6
    Io l'attributo ID non l'ho mai visto ne mai usato e quindi, non sò dirti se funziona o no, l'unica cosa da fare, che è quella più banale, è toglierlo e provare.
    FEDERIX.IT - [Pillola] GRAFICA DEI FORM

    ...ho ancora quella forza che ti serve, quando dici "Si comincia!"

  7. #7
    ok, gli errori di sintassi html sono stati eliminati ma mi da un sacco di problemi (ho quasi 40 errori)sugli script e funzioni che non ho scritto io, piu avanti ve le posterò ciao grazie per l'aiuto...
    www.zukimania.org

  8. #8
    sono calati ancora... sono a 30 ma non mi muovo di li!

    tutti errori o su indirizzi o su script...

    poi uno che non credo si possa validare, il tag marquee, si trova una cosa simile che non dia errore in compilazione?
    ciao grazie
    www.zukimania.org

  9. #9
    Il mio consiglio è quello di eliminare gli script dalle pagine e metterli dentro un file js a parte.

    Il tag <marquee> è deprecato, quindi utilizzabile ma non in regola con gli standard, per sostituirlo puoi fare una gif animata oppure realizzare un piccolo clip con Flash.
    FEDERIX.IT - [Pillola] GRAFICA DEI FORM

    ...ho ancora quella forza che ti serve, quando dici "Si comincia!"

  10. #10
    Utente di HTML.it L'avatar di zoom
    Registrato dal
    Dec 2001
    Messaggi
    1,737
    ma hai provato a mettere così?

    <script type="text/javascript">
    <!--
    codice...
    -->
    </script>

    dovrebbe saltarlo lo script, non essendo in grado di leggerlo... :master:
    Chicco Ravaglia per sempre con noi!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.