Closed Bug 49801 Opened 25 years ago Closed 25 years ago

Select Element 's style visiblility problem

Categories

(Core :: Layout, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: handsuma, Assigned: clayton)

Details

Attachments

(1 file)

the Select Element has problem dealing with the syle sheet visibiliy issue. It switch into visible on a click even thru it is set to "hidden" as in the follow ASP code. Beginning code : ( named as TEST.ASP ) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body bgcolor="#ffff0f" onload="doneload()" onclick="doneload()"> <form id="firstform" method="get"> <input type="text" id="firstbox" style="position:absolute; top:50; width:200px; font-size-adjust: inherit; font-style: italic; font-stretch: inherit; font- size: 90%; background-attachment: scroll; background-image: url(image9a.gif);" onclick="boxover('first')" onkeyup="listcheck('first')" > <select id="firstlist" size="3" style="position:absolute; top: 80;color:black;visibility:hidden; background-color: Gray; background-position: center; background-repeat: repeat-y;" onChange="listchange('first')"> <option value="1 of 6" >one</option> <option value="2 of 6">two</option> <option value="3 of 6" >three</option> <option value="4 of 6" >four</option> <option value="5 of 6" >five</option> <option value="6 of 6" selected>six</option> </select> </form> <script language="JavaScript" type="text/javascript" > function boxover(idname) { idname=idname+"list"; document.firstform.firstlist.style.visibility="visible"; } function boxout(idname) { //alert(idname=idname+"list") //document.getElementById(idname).style.visibility = "hidden"; } function listcheck(idname) { listname = "document.getElementById('" + idname + "list')"; boxname = "document.getElementById('" + idname + "box')"; list = eval(listname); box = eval(boxname); var e =-1; for (i=0;i<list.length;i++) { a = box.value; b = a.length; if ( b !=0 && e ==-1 ) { c = list.options[i].text; d = c.substr(0, b); if (a.toUpperCase()==d.toUpperCase()) e=i; } } if ( e!=-1 ) { list.value=list.options[e].value } } function listchange(idname) { listname = "document.getElementById('" + idname + "list')"; boxname = "document.getElementById('" + idname + "box')"; list = eval(listname); box = eval(boxname); a=eval(list.selectedIndex); box.value=list.options[a].text; //list.style.visibility="hidden"; document.firstform.firstlist.style.visibility="hidden"; } function doneload() { // set all groupings' ready properties to 1 so all functions are enalbed. //document.getElementByName("ready").value=1; alert("Main " + document.firstform.firstlist.style.visibility); } </script> </body> </html>
Not being a serious CSS person, I can't comment on the correctness of the HTML, though it looks reasonable to me. Confirmed Win95 2000082508
Status: UNCONFIRMED → NEW
Ever confirmed: true
Well, I'm no JavaScript expert but isn't that exactly what the code says should happen? When you click on the INPUT, you trigger onclick="boxover('first')", ...and that then eventually hits document.firstform.firstlist.style.visibility="visible"; ...which may or may not be valid, but certainly seems to want to set the select element to visible... no? Marking INVALID, reopen if I got something wrong...
Status: NEW → RESOLVED
Closed: 25 years ago
Keywords: verifyme
Resolution: --- → INVALID
massive update for QA contact.
QA Contact: petersen → lorca
I was working on this one last night, and I crashed out. Oh well. Basically, I was saying that it seems like a number of lines of code are commented out-think maybe that has anything to do with it? Anyway, going with concensus and marking VERIFIED.
Status: RESOLVED → VERIFIED
SPAM. HTML Element component deprecated, changing component to Layout. See bug 88132 for details.
Component: HTML Element → Layout
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: