PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Hilfe ich verzweifle, was ist an dem Code falsch?


JasonX
2004-08-30, 13:17:33
Ich habe ein Dropmenü, gebastelt:

<center><form name="jump">
<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">
<option value="index.html">Home</option>
<option value="news.html">News</option>
<option value="Movies.html">Fun-Movies</option>
<option value="Sounds.html">Fun-Sounds</option>
<option value="Progs.html">Fun-Proxx</option>
<option value="Developer.html">Developer</option>
<option value="/forum/index.php">Fun-Forum</option>
<option value="Impressum.html">Impressum</option>
</select>
</form></center>


und nun will mir der Validator weismachen, das da was falsch ist, aber was wäre da richtig ?

#

Line 13, column 25: required attribute "ACTION" not specified

<center><form name="jump">

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 14, column 114: there is no attribute "VALUE"

...mp.menu.selectedIndex].value;" value="GO">

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.

govou
2004-08-30, 13:49:22
Ich habe ein Dropmenü, gebastelt:

<center><form name="jump">
<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">
<option value="index.html">Home</option>
<option value="news.html">News</option>
<option value="Movies.html">Fun-Movies</option>
<option value="Sounds.html">Fun-Sounds</option>
<option value="Progs.html">Fun-Proxx</option>
<option value="Developer.html">Developer</option>
<option value="/forum/index.php">Fun-Forum</option>
<option value="Impressum.html">Impressum</option>
</select>
</form></center>


und nun will mir der Validator weismachen, das da was falsch ist, aber was wäre da richtig ?

<form name="jump">
Ein form muss immer das Attribut "action" besitzen. Also z.B.:
<form name="jump" action="blah.htm">


...mp.menu.selectedIndex].value;" value="GO">
<select> hat kein Attribut "value".

JasonX
2004-08-30, 14:16:56
aha, und was soll stat dem blah.html rein ??

clm[k1]
2004-08-30, 14:45:52
aha, und was soll stat dem blah.html rein ??

Formulardaten werden nun mal für gewöhnlich an scripte übergeben, welche diese daten verarbeiten!
wenn du mit den daten nichts weiter anstellen willst, brauchst du auch kein formular!

wenn du da bla.html rein schreibst, würde halt die datei bla.html aufgerufen, da das aber eine gewöhnliche html-datei ist, würde da auch ein link reichen.

Außerdem fehlt in deinem formular ohnehin ein absende-button.

gruß
clm[k1]

JasonX
2004-08-31, 05:07:34
Ist kein Formular, ist nur ein Dropdown, der dann automatisch zum ausgewählten bereich weiterleitet.

clm[k1]
2004-08-31, 12:22:13
Ist kein Formular, ist nur ein Dropdown, der dann automatisch zum ausgewählten bereich weiterleitet.

Eine solche drop-down-liste IST ein formular-element!
Alles was nur innerhalb von "form" stehen darf ist teil eines formulars!


gruß
clm[k1]