|
#1
|
|||
|
|||
|
I have some code that is exhibiting strange behavior. It appears to be
related to the use of frames, a <select> control, and some basic CSS. I'll list the HTML at the end of the post (three separate files). The gist is that If you put a multiple=true <select> tag inside a frame and set the "width" style, it becomes impossible to grab the scrollbar of the select control if you adjust the frame separator slightly to the left. Actually, if you set the width of the select box to value in a certain range you can actually grab the scrollbar again if you move the frame slider far enough to the left. In the sample code I list, if you move the frame slider about half way between where it starts out at (200px over) and the left edge of the page, you won't be able to grab the scrollbar. However, if you move the slider all the way over to the left, you will be able to grab it. It appears to have something to do with the relationship between the width of the select box and the width of the frame. If you remove the width setting from the select box, things work normally. Of course, if you removed the frames from the picture it would be fine too, but I can't do that. Does anyone know what's going on with this or have a work around? I need to be able to set the width of the select box and it must work inside a frame. I'm running IE 6 on XP SP 2. There are three files in all, frames.html, right.html, and left.html. Their source is as follows: -frames.html- <html> <frameset id="topframe" cols="200,*"> <frame src="left.html"> <frame src="right.html"> </frameset> </html> -left.html- <html> <body> </body> </html> -right.html- <html> <body> <select size=5 multiple=true style="width: 200"> <option value="1">one</option> <option value="2">two</option> <option value="3">three</option> <option value="4">four</option> <option value="5">five</option> <option value="6">six</option> <option value="7">seven</option> <option value="8">eight</option> <option value="9">nine</option> <option value="10">ten</option> </select> </body> </html> Thanks, Dave |
|
#2
|
|||
|
|||
|
After doing a little more testing, I've discovered that it doesn't have
to do with setting the "width" attribute of the style tag per se, but really just the width of the listbox, however that gets set. It was actually happening with the listbox in my first example when the width setting was removed, I just didn't notice because if you move the frame slider just a little to left it starts working again. So if you make the select box wider by having wide text values instead of setting the width in the style tag, like this <select size=5> <option value="1">one one one one one one one</option> <option value="2">two</option> <option value="3">three</option> <option value="4">four</option> <option value="5">five</option> <option value="6">six</option> <option value="7">seven</option> <option value="8">eight</option> <option value="9">nine</option> <option value="10">ten</option> </select> you'll still get the bug. It appears to be a problem with the <select> tag and frames. Dave |
|
#3
|
|||
|
|||
|
I've had people tell me that they are running the same version of
Windows and IE that I am and haven't gotten this issue to occur. However I've duplicated this issue on a number of computers in different locations. The full IE version number I'm using is 6.0.2900.2180.xpsp_sp2_gdr.050301-1519. I'm not sure what all that means but it looks like it's a rev of IE 6.0 for WinXP SP2. I also wanted to correct an error in my first post. I stated that you have to set the "multiple" attribute to "true" in the <select> tag. The multiple attribute doesn't matter. You have to set the "size" attribute to something smaller than the number of items you have in your list (so you get a listbox with scrollbars). In any case, sourcecode I listed works. I've also noticed that if you minimize the browser or select another window and come back to the browser, the bug goes away. So I guess it's related to a screen repaint. Has anyone seen or heard of this? I can't find any reference to it anywhere. Dave |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|