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

    form non validato da w3c

    Ciao a tutti non riesco a risolvere con la validazione del codice per un form secondo gli standard del w3c

    il codice presente nella pagina è:
    <div class="tabcontentstyle">
    <div id="tcontent1" class="tabcontent">
    <div align="center">[img]img/sm_prenota.gif[/img]

    <strong class="pullquote">Verifica <span class="style1">disponibilità e prezzi</span> :[/b]</div>
    <form action="check2.php" method="get" name="formData">
    <table>


    <tr>
    <td>Data arrivo: </td>
    Riga 1 <td><input type="text" name="data_partenza">[img]images/show-cal.gif[/img]</td>
    </tr>
    <tr>
    <td>Data partenza: </td>
    Riga 2 <td> <input type="text" name="data_arrivo">[img]images/show-cal.gif[/img]</td>
    </tr>
    <tr><td>Tipo di camera: </td>
    <td> <select size="1" name="tipo_camera">

    <?
    $obj->connessione();
    $dati=mysql_query("select * from configurazione where id=1");
    while($array=mysql_fetch_array($dati)){
    if($array[singola]==1)echo"<option value=\"singola\">singola</option>";
    if($array[doppia]==1)echo"<option value=\"doppia\">doppia</option>";
    if($array[doppiausosing]==1)echo"<option value=\"doppiausosing\">doppia uso singola</option>";
    if($array[tripla]==1)echo"<option value=\"tripla\">tripla</option>";
    if($array[quadrupla]==1)echo"<option value=\"quadrupla\">quadrupla</option>";
    if($array[appartamento]==1)echo"<option value=\"appartamento\">appartamento</option>";
    }
    ?>

    </select> </td></tr>
    </table>


    Riga 3 <input type="button" onclick="javascript:apri('check2.php?data_partenza ='+document.formData.data_partenza.value+'&amp;dat a_arrivo='+document.formData.data_arrivo.value+'&a mp;tipo_camera='+document.formData.tipo_camera.val ue,500,600);" value="Verifica disponibilita">
    Riga 4 </form>
    Riga 5 </div>
    </div>

    <div id="tcontent2" class="tabcontent">
    <div align="center">[img]img/sm_lastminute.gif[/img]

    <strong class="pullquote"><span class="style1">Offerte</span> Last Minute :[/b]</div>
    <?
    $obj->connessione();
    $dati=mysql_query("select * from offerte order by id desc");
    while($array=mysql_fetch_array($dati)){
    echo "".$array[nome]."
    ".$array[italiano]."

    ";
    }
    ?>
    </div>

    </div>


    Mentre i messaggi di errore sono :

    Validation Output: 10 Errors
    ---------------------------------------------------------------------------------------
    Line 1, Column 48: end tag for "input" omitted, but OMITTAG NO was specified .

    …put type="text" name="data_partenza"><a href="javascript:show_calendar('formD✉
    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
    ---------------------------------------------------------------------------------------
    Line 1, Column 8: start tag was here .
    <td><input type="text" name="data_partenza"></td>✉
    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 occurred in a script section of your document, you should probably read this FAQ entry.
    ---------------------------------------------------------------------------------------

    Line 2, Column 46: end tag for "input" omitted, but OMITTAG NO was specified .

    …input type="text" name="data_arrivo"><a href="javascript:show_calendar('formD✉
    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
    ----------------------------------------------------------------------------------------
    Line 2, Column 8: start tag was here .

    <td> <input type="text" name="data_arrivo"></td>✉
    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 occurred in a script section of your document, you should probably read this FAQ entry.
    ----------------------------------------------------------------------------------------
    Line 3, Column 266: end tag for "input" omitted, but OMITTAG NO was specified .

    …00);" value="Verifica disponibilita">✉
    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
    ---------------------------------------------------------------------------------------
    Line 3, Column 0: start tag was here .

    <input type="button" onclick="javascript:apri('check2.php?data_partenza ='+docume

    ----------------------------------------------------------------------------------------

    Line 1, Column > 80: XML Parsing Error: Opening and ending tag mismatch: input line 76 and a .

    …nza"><a href="javascript:show_calendar('formData.data_part enza');" /><img src…✉
    --------------------------------------------------------------------------------------
    Line 2, Column > 80: XML Parsing Error: Opening and ending tag mismatch: input line 80 and a .

    …o"><a href="javascript:show_calendar('formData.data_arri vo');" /><img src="im…✉
    ----------------------------------------------------------------------------------------
    Line 4, Column 13: XML Parsing Error: Opening and ending tag mismatch: input line 89 and form .

    </form>
    ----------------------------------------------------------------------------------------

    Line 5, Column 10: XML Parsing Error: Opening and ending tag mismatch: form line 70 and div .
    </div>

    Ciao e grazie

  2. #2
    Utente di HTML.it L'avatar di carlo2002
    Registrato dal
    Jun 2002
    Messaggi
    2,747
    Intanto ti do un consiglio. Non devi postare il codice php bensì solo l'output html sul quale viene fatta la validazione w3c. Inoltre al fine di renderlo più leggibile a chi ti vorrebbe aiutare, devi indentare il codice negli appositi tag [code].

    Errare humanum est, perseverare ovest

  3. #3
    Confermo quanto detto... cosi resta difficile da leggere. E a questo fai prima a passare il link...
    Cmq in generale è scritto abbastanza bene (anche se in inglese) quello che c'è di sbagliato. Di conseguenza sai cosa bisogna correggere.
    Se ti dice che manca l'apertura di un tag, ad esempio, devi iniziare a controllare lì...

    (controlla anche come hai scritto "java-script" negli href che non è corretto)
    Fantasupermegafavolipermeramagicultra irresistibili
    4 10 30 100 1001 personaggi insuperabili fantaincredibili ultraimpossibili iperterribili irresistibili!!!

    "... a quell'età ... bastava un dito per fare la pace ..."
    fotine

  4. #4
    Grazie carlo2002 e ricman per avermi risposto. Mi spiace di aver postato così male il codice, ero dalla mattina cercando di mettere apposto quella pagina che inizialmente conteneva 130 errori. Correggo subito, java-script con javascript.

    Molte grazie per la vostra disponibilità

  5. #5
    Ciao si vedeva java-script anzichè javascript perchè era postato male

    codice:
    <div class="tabcontentstyle">
    <div id="tcontent1" class="tabcontent">
      <div align="center">[img]img/sm_prenota.gif[/img]
    
          <strong class="pullquote">Verifica <span class="style1">disponibilità e prezzi</span> :[/b]</div>
            <form action="check2.php" method="get" name="formData">
      <table>
    
    
                <tr>
    			    <td>Data arrivo: </td>
    				<td><input type="text" name="data_partenza">[img]images/show-cal.gif[/img]</td>
    			</tr>
                <tr>
    			<td>Data partenza: </td>
    			<td> <input type="text" name="data_arrivo">[img]images/show-cal.gif[/img]</td>
    			</tr>
                <tr><td>Tipo di camera: </td>
    			<td>   <select size="1" name="tipo_camera">
                       </select>  </td></tr>
      </table>  
    
    
    <input type="button" onclick="javascript:apri('check2.php?data_partenza='+document.formData.data_partenza.value+'&amp;data_arrivo='+document.formData.data_arrivo.value+'&amp;tipo_camera='+document.formData.tipo_camera.value,500,600);" value="Verifica disponibilita">
          </form>
    
    </div>
    
    <div id="tcontent2" class="tabcontent">
      <div align="center">[img]img/sm_lastminute.gif[/img]
    
          <strong class="pullquote"><span class="style1">Offerte</span> Last Minute :[/b]</div>
    </div>
    
    </div>

  6. #6
    Utente di HTML.it L'avatar di carlo2002
    Registrato dal
    Jun 2002
    Messaggi
    2,747
    <a href="" />

    sbagliato, così si chiudono gli img,br etc.
    Errare humanum est, perseverare ovest

  7. #7
    Ciao carlo2002, avevo provato con il link corretto ma gli errori aumentavano da 10 a 17

    Per vedere gli errori posto il link alla pagina del w3c validator cliccando http://validator.w3.org/check?uri=ht...Inline&group=0

  8. #8
    Utente di HTML.it L'avatar di carlo2002
    Registrato dal
    Jun 2002
    Messaggi
    2,747
    ecco, anche gli input vanno chiusi come gli img

    codice:
    <input type="text" name="data_partenza" />
    Errare humanum est, perseverare ovest

  9. #9
    Ottimo!! Molte grazie carlo 2002, gli errori sono scesi a 3, ma non riesco a capire dove possano essere gli errori nei div non aperti, li ho controllati e ricontrollati 1000 volte

  10. #10
    Utente di HTML.it L'avatar di carlo2002
    Registrato dal
    Jun 2002
    Messaggi
    2,747
    si ho visto. mi sa che ti tocca guardare meglio.

    un consiglio, nella pagina di validazione nella sezione 'options' se selezioni 'Show Source' compare l'output html con i numeri di riga così vedi subito dove si trovano gli errori.

    se poi selezioni anche 'Clean up Markup with HTML Tidy' verrà visualizzato anche il codice corretto
    Errare humanum est, perseverare ovest

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 © 2026 vBulletin Solutions, Inc. All rights reserved.