Closed Bug 62233 Opened 24 years ago Closed 23 years ago

Resizing select box doesn't cause redraw of table.

Categories

(Core :: Layout: Tables, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: garsh, Assigned: karnaze)

References

Details

Attachments

(2 files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.16-3 i686; en-US; 0.6) Gecko/20001205 BuildID: mozilla 0.6 Using javascript, a selection box gets resized, but the rest of the table around it is not being redrawn, causing overlaps to occur. Reproducible: Always Steps to Reproduce: Create the html file found at the end of this description. Next, click on the selection box, and choose the last item. At this point, the javascript code will change the choices availabe in the selection box, but the rest of the table won't be redrawn, causing an overlap of the selection box with the link that appears to the right of it. Actual Results: Only the selection box was redrawn - not the rest of the table. Expected Results: The entire table should have been redrawn. file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML><HEAD> <TITLE>Perforce Browser</TITLE> <SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript"><!-- Hide script //Define the depot array a = new Array(86) a[0] = new Array(2) a[0][0] = "//depot" a[0][1] = "//depot/prod" a[1] = new Array(3) a[1][0] = "//depot/prod" a[1][1] = "//depot/prod/averylongname" a[1][2] = "//depot/prod/anotherverylongname" function update_depot(form) { if (!(form.depot.selectedIndex > 0)) { form.depot.selectedIndex = 0 } var val = form.depot.options[form.depot.selectedIndex].value for (var i = 0; i <= 85; i++) { if (a[i][0] === val) { var oldlength = form.depot.length // Remove the old elements from options for (var j = 0; j < oldlength; j++) { form.depot.options[0] = null } // Insert the new elements into options for (var j = 0; j < i; j++) { for (var k = 1; k < a[j].length; k++) { if (a[j][k] === a[i][0]) { form.depot.options[form.depot.options.length] = new Opti on(a[j][0], a[j][0]) } } } for (var j = 0; j < a[i].length; j++) { form.depot.options[form.depot.options.length] = new Option(a[i][ j], a[i][j]) } form.depot.selectedIndex = (i == 0) ? 0 : 1 return true } } form.depot.selectedIndex = 0 return true } // End script hiding --></script> </HEAD> <BODY BGCOLOR="white"> <CENTER><H1>Perforce Browser</H1></CENTER> <TABLE CELLSPACING="3" CELLPADDING="0"> <TR> <TD COLSPAN="10"><EM>View the last 50 changes to a depot:</EM></TD></TR> <FORM METHOD="GET" ACTION="/" ENCTYPE="application/x-www-form-urlencoded" NAME=" changes"> <INPUT TYPE="hidden" NAME="command" VALUE="changes"> <TR><TD> </TD> <TD>Recent changes:</TD> <TD><SELECT NAME="depot" ONCHANGE="update_depot(document.changes)"> <OPTION VALUE="//depot">//depot <OPTION VALUE="//depot/prod">//depot/prod </SELECT> </TD> <TD> (<a href="http://perforce/?command=advanced_changes&depotlist=default">adva nced</a> querying)</TD> </TR> </FORM> </TABLE> </BODY> </HTML>
This is because the onchange event is not fired as it should. See bug 61336 and bug 55206. Of which one is this a dup? Fabian.
Whiteboard: DUPEME
By puting this DOCTYPE into your document, you NEED to confirm that your page/source is validated at source: http://validator.w3.org/check?uri=http://www.whateven.com/path/file.html And then you will know that your code is wrong programmed, sorry for that. B.T.W. I made some changes to your code: Note, I only took this part as an example for now: <form method="GET" action="/" enctype="application/x-www-form-urlencoded" name= "changes"><input type="hidden" name="command" value="changes"> <table cellspacing="3" cellpadding="0" summary=""> <tr> <td colspan="10"><em>View the last 50 changes to a depot:</em></td> </tr> <tr> <td></td> <td>Recent changes:</td> <td><select name="depot" onchange="update_depot(document.changes)"> <option value="//depot">//depot</option> <option value="//depot/prod">//depot/prod</option> </select> </td> <td>(<a href= "http://perforce/?command=advanced_changes&amp;depotlist=default">advanced</a> querying)</td> </tr> </table> </form> 1 - HTML 4.0 is not working with a <form></form> inside! And is onchange is not fired, then it's 'Event Handling' and not 'Layout'. Your W3C validator, Friendly, HJ.
Changing to Event handling
Assignee: clayton → joki
Status: UNCONFIRMED → NEW
Component: Layout → Event Handling
Ever confirmed: true
QA Contact: petersen → lorca
Attached file Example
Attached file Example 2
In example one we see the layout problem, the reporter was complaining about. In example two we see how to work around this problem. Also example one might be handy for layout to verify and work on this bug. Can someone please change 'OS' to 'all' and 'Component' to 'layout'. And sorry Chris, but after the comment of Fabian, I took the wrong turn. Don't get me wrong Fabian, that's my mistake! I must take more attention while reading bug comment of reporters! I sure hope to help this reporter with the work around I found. Sorry that it took so long, but as I told before, I lost him! Most friendly, HJ. n.b. I just need a bit more power at Bugzilla, where do you get that? Sorry for the SPAM
*** Bug 63152 has been marked as a duplicate of this bug. ***
Fabian, now this really seems to be a table problem. I have made two working testcases, to proof that. The onchange event seems to be working just fine. But is there's no character behind the </statement> that the redraw doen not occur! The second example might be a valid work around for now. By putting a, in this case, <a href=""> element directly after the element </select>. It does redraw the table. And I don't think this is a regression, do you? But correct me if I'm wrong! Most friendly, HJ.
Shoot, sorry for the spam. I don't think it's a dups of bug 55206 because that's security related. And bug 61336 is event related. So this might be a new one.
Thanks for the analysis guys! I am sending this over to the table folks...
Assignee: joki → karnaze
Component: Event Handling → HTMLTables
QA Contact: lorca → chrisd
*** Bug 63152 has been marked as a duplicate of this bug. ***
QA contact update
QA Contact: chrisd → amar
2001-05-17-21 linux x86 This seems to be working now. Both testcases above are working. Can anyone else confirm?
WFM, Linux CVS build today. Closing. Please reopen if the problem occurs again.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: