Closed Bug 2576 Opened 26 years ago Closed 26 years ago

In some select of a form gecko put an aditional select field empty.

Categories

(MozillaClassic Graveyard :: Windows FE, defect, P2)

1998-03-31
x86
Windows 95
defect

Tracking

(Not tracked)

VERIFIED WONTFIX

People

(Reporter: aldmar, Assigned: rickg)

Details

This is the code : <form name="rumba" method="get" action="/rumba/resultado_rumba.html"> <input type="hidden" value="0" name="pasar"> <input type="hidden" value="0" name="codigo"> <input type="hidden" value="Todas" name="nombre"> <input type="hidden" value="0" name="posicion"> <input type="hidden" value="0" name="nombre_genero"> <table width=460 bgcolor=#FF9900 border=0 cellspacing=0 cellpadding=3> <tr> <td width=460 bgcolor=#FF9900 valign=top colspan=3> <b><font face=Arial size=-1 color=#000000 class=genero>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Para buscar un lugar en particular, elija el tipo, la zona o &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;escriba el nombre del lugar. </font></b> </td> </tr> <tr> <td width=150 align=center bgcolor=#FF9900 rowspan=4> <img src="/img/icnrumba1.gif" border=0 hspace=20 vspace=10 align=center> </td> <td width=60 bgcolor=#FF9900> <FONT face="Arial" size=-1 color="#000000" class=genero>G&eacute;nero</font>&nbsp; </td> <td width=170 bgcolor=#FF9900> <font face="Arial" size=-2 color="#000000"> <select name="genero"> <option value=0>Cualquiera</option> <option value="0">Cualquiera</option> <option value="1">Antillana</option> <option value="2">Bohemia</option> <option value="8">Crossover</option> <option value="3">Jazz</option> <option value="7">Mariachis</option> <option value="4">Merengue</option> <option value="10">Otros</option> <option value="11">Rock</option> <option value="5">Salsa</option> <option value="9">Tienda</option> <option value="12">Trance</option> <option value="6">Tropical</option> <option value="13">Vallenato</option> <select> </td> </tr> <tr> <td width=60 bgcolor=#FF9900> <font face="Arial" size=-1 color="#000000" class=genero>Sector</font> &nbsp; </td> <td width=170 bgcolor=#FF9900> <font face="Arial,Helvetica" size=-2 color=#000000> <select name="zonas"> <option value="0">Cualquiera</option> <option value="0">Cualquiera</option> <option value="ZA">Alrededores</option> <option value="ZC">Centro</option> <option value="CH">Chapinero</option> <option value="ZT">Noroccidente</option> <option value="ZN">Norte</option> <option value="ZO">Occidente</option> <option value="ZS">Sur</option> </select> </font> </td> </tr> <tr> <td width=60 bgcolor=#FF9900> <FONT FACE="Arial" size=-1 color="#000000" class=genero>Sitio</font> &nbsp; </td> <td width=170 bgcolor=#FF9900> <font face="Arial,Helvetica" size=-1 color="#000000"> <input type="text" name="nombre_s" value="" size="15"> </font> </td> </tr> <tr> <td width=20 bgcolor=#FF9900>&nbsp;&nbsp; </td> <td bgcolor=#FF9900 align=left> <a href="javascript:document.rumba.submit();"><img src="/img/bobusc.gif" alt="Busqueda de rumba" border=0></a> </td> </tr> </table> </form> How can I navigate for internet URL's diferent to mi LAN?
1) This is really a parser issue. 2) I tested this on build 21-Jan-99 Win95 optimized. I don't really think this is a bug since the HTML is incorrect and NGLayout is just doing what it is told (more or less). However, Nav4 is forgiving of this particular error. The error is that an "empty" <select> statement is declared in one of the table cells. Nav4 throws away the empty container, but NGLayout sets up a scroll box with no content. ((I believe that the submitter intended to type </select> and not <select>)). The submitted HTML can be reduced to the following, which shows the bug: <html><body> <form name="rumba" method="get" action="whatever"> <table border=1 cellpadding=20> <tr><td> <select name="genero"> <option value="0">Cualquiera</option> <option value="1">Antillana</option> <select> <!-- **AAACK** ... what should be done with this? --> </td></tr> </table> </form> </body></html>
Setting all current Open/Normal to M4.
Assignee: blythe → don
giving all of garret's bugs to don. Don, if you're the wrong person, a thousand apologies.
Assignee: don → rickg
Re-assigned to rickg@netscape.com. Rick, any idea who should get this beast? Sounds like some kind of layout problem ...
Assignee: rickg → karnaze
This is NOT a parser bug. The lone <select> tag at the end of the reduced case (below) gets emited as the author specified and then I auto-close it. To be consistent with ALL other tags, an open tags causes an element to be constructed, even if it's completely empty. I think ChrisK may decide to not display an empty select, but that's a forms decision.
Assignee: karnaze → rickg
To add to the suspense, Nav4.5 does not display a <select> without a </select>, but does display it if there is a </select>. How are we going to handle Nav quirks mode if not through the parser/content sink? And if the parser doesn't create the <select>, can javascript add an <option> to it? The example below has javascript code that prints out the number of <selects> in the document. Unfortunately it doesn't work in Nav4.5. I've added Vidur to the cc list and maybe he can say why. --- even simpler example <html> <body ONLOAD="myPrint();"> <form> the following shows up in both Nav4.5 and Gecko <select></select> <BR> the following shows up in Gecko but not Nav4.5 <select> </form> <script> function myPrint() { var selects = document.getElementsByTagName("SELECT"); alert("number of selects=" + selects.length + "\n"); } </script> </body> </html>
Added Vidur this time. Vidur, can you please look at the previous comment.
document.getElementsByTagName() is a DOM Level 1 method. DOM Level 1 wasn't implemented in 4.5.
You can just look at document.forms[0].elements.length instead in 4.5 (and in NGLayout).
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → WONTFIX
THIS IS NOT A BUG!!!!!! It is, however, not compatible with the behavior of Nav4.x, and that's ok. We have to rationalize the competing goals of backward compatibility and predictability. In nav4.x, when we see the open select (without any content or a close tag) we ignore the select. However, we don't act that way with other tags in 4.x. In other words, 4.x is inconsistent in it's answer when dealing with a lone open tag without content. (You can prove that to yourself by trying this with a lone <Table> tag). I'm NOT going to duplicate this inconsistency. If someone says to open a container, and that container is legal, I'm going to open it in ALL cases, not just some. Otherwise, I'd be violating the law of least surprise -- not a good thing.
VERIFIED, MozillaClassic is dead.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.