Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 12

Discussione: Form VS Convalidator

  1. #1
    Utente di HTML.it L'avatar di norske
    Registrato dal
    Oct 2005
    Messaggi
    19

    Form VS Convalidator

    Ciao a tutti, ho dei problemi con il convalidatore del w3c riguardo un form; ne sto uscendo pazzo

    Vi incollo di seguito gli errori.. ( sono tanti..eppure sono poche righe di codice )

    # Error Line 23 column 11: there is no attribute "name".
    <form name="loginform" action="login.php" method="post">

    # Error Line 24 column 17: document type does not allow element "label" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

    <label for="user">user</label>

    # Error Line 25 column 139: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
    ...'" onmouseout="this.className='form'">


    # Error Line 25 column 140: end tag for "input" omitted, but OMITTAG NO was specified.
    ..." onmouseout="this.className='form'">

    # Info Line 25 column 0: start tag was here.

    <input id="user" type="text" value="unnamed" size="12" class="form" onmouseover=

    # Error Line 26 column 0: character data is not allowed here.

    password <input id="pass" type="password" size="8" class="form" onmouseover="thi

    You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include putting text directly in the body of the document without wrapping it in a container element (such as a

    aragraph</p>) or forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes).

    # Error Line 26 column 135: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

    ...'" onmouseout="this.className='form'">

    # Error Line 26 column 136: end tag for "input" omitted, but OMITTAG NO was specified.

    ..." onmouseout="this.className='form'">

    # Info Line 26 column 9: start tag was here.

    password <input id="pass" type="password" size="8" class="form" onmouseover="thi

    # Error Line 27 column 44: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

    <input type="submit" id="btnlogin" value="">

    Il codice del form e' il seguente
    codice:
    <form name="loginform" action="login.php" method="post">
    <label for="user">user</label> 
    
    <input id="user" type="text" value="unnamed" size="12" class="form" onmouseover="this.className='form2'" onmouseout="this.className='form'">
    password <input id="pass" type="password" size="8" class="form" onmouseover="this.className='form2'" onmouseout="this.className='form'">
     <input type="submit" id="btnlogin" value="">
    </form>

    Vi ringrazio anticipatamente

    "..rivers of sorrow
    ocens deep with hope.."

  2. #2
    Gli errori del validator sono come i fogli di stile: a cascata. Se ne fai uno ne segue una serie interminabile. Che tipo di doctype hai usato?

  3. #3
    Utente di HTML.it L'avatar di norske
    Registrato dal
    Oct 2005
    Messaggi
    19
    codice:
    !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmnls="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it" dir="ltr">
    heeheh penso di aver inserito il giusto doctype
    "..rivers of sorrow
    ocens deep with hope.."

  4. #4

  5. #5
    Utente di HTML.it L'avatar di norske
    Registrato dal
    Oct 2005
    Messaggi
    19
    grazie thomas, ma e' troppo difficile quel documento per un noob come me, cmq ci ho dato una letta..

    ho modificato il code cosi'

    codice:
    <form action=\"login.php\" method=\"post\">
    user <input type=\"text\" name=\"user\" size=\"12\" class=\"form\" onmouseover=\"this.className='form2'\" onmouseout=\"this.className='form'\" value=\"unnammed\">
    password <input type=\"text\" name=\"pass\" size=\"12\" class=\"form\" onmouseover=\"this.className='form2'\" onmouseout=\"this.className='form'\">
    <input type=\"submit\" id=\"btnlogin\"  value=\"\">
    </form>
    P.S: scusate i \" ma ho uno script in php che mi echa questo form se l'utente non e' loggato, ergo non mi andava di modificarlo
    P.S2: ho fatto riferimento a quell'esempio del sito http://www.topxml.com/xhtml/xhtml_tag_form.asp , ho solo aggiunto le classi

    Gli errore sono sempre i stessi :/
    Grazie...
    "..rivers of sorrow
    ocens deep with hope.."

  6. #6
    Utente di HTML.it L'avatar di norske
    Registrato dal
    Oct 2005
    Messaggi
    19
    ho provato tutto il giorno...
    alla fine ho convalidato la pagina (diciamo solo l'header )
    pero' ora mi si vede un po' malino la pagin :P

    Vorrei ottenere un risultato come questo, solo che aggiuggendo quei tag ul, e li (guarda te che tocca fare per far convalidare un form)

    Ciao e grazie.
    "..rivers of sorrow
    ocens deep with hope.."

  7. #7
    Utente di HTML.it L'avatar di norske
    Registrato dal
    Oct 2005
    Messaggi
    19
    codice:
    [*] <form action="login.php" method="post" >
    <h6>user</h6> 
    <div> <input type="text" name="user" size="12" class="form" onmouseover="this.className='form2'" onmouseout="this.className='form'" value="unnammed" /> </div>
    <h6>password</h6>
    <div> <input type="text" name="pass" size="12" class="form" onmouseover="this.className='form2'" onmouseout="this.className='form'" /></div>
    <div><input type="submit" id="btnlogin"  value="" /> </div>
    </form>
    scusate ancora, per convalidare quel form ho dovuto fare sto schifo .
    Ora si vede malissimo come posso fare?
    devo creare classi per i li ei div vero? :/

    ecco qui la pagina http://www.schuldiner.altervista.org/newvoice/

    grazie..
    "..rivers of sorrow
    ocens deep with hope.."

  8. #8
    Utente di HTML.it L'avatar di norske
    Registrato dal
    Oct 2005
    Messaggi
    19
    nessuno puo' aiutarmi?
    nessuno ha mai incontrato questa difficolta su siti che usano xhtml e form?
    "..rivers of sorrow
    ocens deep with hope.."

  9. #9
    Ragiona per passi.

    1. togli il <form> da[*];
    2. raggruppa i due campi di testo usando <fieldset> (e se vuoi anche <legend>), nel senso che devi inserire il tutto all'interno di <fieldset>;
    3. non è un problema di XHTML, ma di CSS. posta qui il codice del form.


  10. #10
    Utente di HTML.it L'avatar di norske
    Registrato dal
    Oct 2005
    Messaggi
    19
    codice:
    <form action="login.php" method="post">
    user <input type="text" name="user" size="12" class="form" onmouseover="this.className='form2'" onmouseout="this.className='form'" value="unnammed" />
    password <input type="text" name="pass" size="12" class="form" onmouseover=\"this.className='form2'" onmouseout="this.className='form'" />
    <input type="submit" id="btnlogin"  value="" />
    </form>
    eccolo qui! Sono qui che provo da due giorni son arrivato a scrivere queste assurdita' (molto lol pero')

    codice:
     <ul> [*]
       <form action="login.php" method="post">
    user<ins>
    <input type="text" name="user" size="12" class="form" onmouseover="this.className='form2'" onmouseout="this.className='form'" value="unnammed" />
    </ins>
       </form>
      [/list]
    con <fieldset> o <legend> non mi crea una specie di box con gli angoli arrotondati? io vorrei non toccare le altezze del box della loginbar.
    "..rivers of sorrow
    ocens deep with hope.."

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.