| Author |
Drop down box not working in IE7 but very well displayed in Mozzila
|
Rachel Kumar
Ranch Hand
Joined: Oct 21, 2008
Posts: 51
|
|
i have used <s:select> tag to display the drop downs It works fine in Mozzila, but its very weird in IE7. How do i solave this issue? Please help me.
|
 |
Tom Rispoli
Ranch Hand
Joined: Aug 29, 2008
Posts: 349
|
|
|
How is it displaying strangely? what is the html source its generating? What theme are you using?
|
 |
Rachel Kumar
Ranch Hand
Joined: Oct 21, 2008
Posts: 51
|
|
IE7-the drop down come out from its place and adjusts itself to display the results.. for example if the drop down is in the first row of the column and has got many data to display, it jumps to the third row to show the data in the browser window Mozilla- it displays from its place it does not adjust itself.
|
 |
Tom Rispoli
Ranch Hand
Joined: Aug 29, 2008
Posts: 349
|
|
|
It might help to see the html source generated by the s:select tag. You might also want to try using theme="simple" in the tag.
|
 |
Rachel Kumar
Ranch Hand
Joined: Oct 21, 2008
Posts: 51
|
|
|
i have used theme = simple in the tag...and what do i see in the html, it looks same...please help me its urgent....
|
 |
Tom Rispoli
Ranch Hand
Joined: Aug 29, 2008
Posts: 349
|
|
|
ok, please POST the html and the relevant part of your jsp so I can see it.
|
 |
Tom Rispoli
Ranch Hand
Joined: Aug 29, 2008
Posts: 349
|
|
|
Try sending the full html (so I can try it in IE), and the full jsp.
|
 |
Rachel Kumar
Ranch Hand
Joined: Oct 21, 2008
Posts: 51
|
|
it is the JSP i dont know how to get the HTML... Tell me how to do it please
|
 |
Tom Rispoli
Ranch Hand
Joined: Aug 29, 2008
Posts: 349
|
|
|
In IE, when the screen is displayed, right click and select "view source"
|
 |
Rachel Kumar
Ranch Hand
Joined: Oct 21, 2008
Posts: 51
|
|
|
Please reply, please help me
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56151
|
|
Please read this and this . [ October 29, 2008: Message edited by: Bear Bibeault ]
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16479
|
|
|
I'm sure you could produce a smaller piece of code which demonstrated your problem. There must be over a thousand lines in what you posted (I gave up scrolling past them), and nobody wants to deal with that much code. Please try to post a small, runnable, example of the problem. And post it inside the code tags, too, please, so it is readable.
|
 |
Rachel Kumar
Ranch Hand
Joined: Oct 21, 2008
Posts: 51
|
|
-------------------------------------------------------------------------------- ----------- HTML ----------- <td> <select id="lng_2411" onchange="updateLanguage('2411',this.value);" style="width: 75px;" name="title.language"> <option value="afr">Afrikaans</option> <option value="alb">Albanian</option> <option value="khm">Central Khmer</option> <option value="chi">Chinese</option> <option value="chu">Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic</option> <option value="cpf">Creoles and Pidgins, French-based (Other)</option> <option value="scr">Croatian</option> <option value="zul">Zulu</option> </select> <img id="lngind_2411" border="0" align="top" src="/ecs-of/images/indicator.gif" alt="Please Wait" title="Please Wait" style="display: none;"/> </td> ------------ JSP ---------- <s:select id="lng_%{#attr.work_queue.itemId}" list="languages" onchange="updateLanguage('%{#attr.work_queue.itemId}',this.value);" class="standardInputField" cssStyle="width: 75px;" name="title.language" theme="simple" listKey="code" listValue="description" value="%{#attr.work_queue.language}" /> this is my JSP and the corresponding HTML generated. so there is the problem. i dont know why the drop down list box is behaving weird...please help
|
 |
Tom Rispoli
Ranch Hand
Joined: Aug 29, 2008
Posts: 349
|
|
|
Looks like your problem is that the list is allowed to take up more than half of the height of the screen, so if a drop down in the middle of the screen is selected the list can't be displayed either entirely above or below the location of the input field. I think your options are to try a smaller font, or to use the size attribute to limit the number of options you display.
|
 |
Rachel Kumar
Ranch Hand
Joined: Oct 21, 2008
Posts: 51
|
|
yes your suggestion seems to be reasonable but, i tried using the size attribute to 10, but it sets the size of the list box to show 10 values before selecting itself.so what would be the option to show only 10 records on click and scroll to see the rest?. Please Help me!
|
 |
Tom Rispoli
Ranch Hand
Joined: Aug 29, 2008
Posts: 349
|
|
|
I guess it depends on your requirements. I'm surprised that the behavior in IE7 isn't acceptable (although it would be nicer if it would display fewer items if they didn't fit on the scree). I think I would try reducing the font-size until the list would always fit on the screen, but like I said, it depends on your requirements.
|
 |
Rachel Kumar
Ranch Hand
Joined: Oct 21, 2008
Posts: 51
|
|
|
OK as you say how to control the size of the list box when clicked on it, so that it would display only 10 records and to scroll to see the rest?
|
 |
Tom Rispoli
Ranch Hand
Joined: Aug 29, 2008
Posts: 349
|
|
You can do it that way (using the size attribute) but I think that would be my last choice. My first first choice would be to leave it as is since it doesn't seem to be much of an issue (but if who ever is giving you your requirements says it needs to change, it needs to change). I would think a reduction in font-size would fix your problem and alllow you to keep the screen as similar as possible. How does Mozilla prevent this? Does it not display as many values when you click on the select? Does it display things smaller so that they fit on the screen? Does it actually display a smaller list when you select the fields in the middle of the screen? Does the list just run off the top/bottom of the screen?
|
 |
Rachel Kumar
Ranch Hand
Joined: Oct 21, 2008
Posts: 51
|
|
Yes the requirement says it has to be changed.So it has to be. yes Mozilla actually displays a smaller list when you select the fields in the middle of the screen.and it doesn't run top/bottom.. While IE7 just displays the whole list as it is.So thats the problem. its perfect in Mozilla...How do i handle this?.... Is there a way to control this size...the size attribute that you told is for the number of records to show initially itself that before clicking the list box....so that doesn't help that much though....i want ti control the list to be shown after click....
|
 |
Tom Rispoli
Ranch Hand
Joined: Aug 29, 2008
Posts: 349
|
|
|
I couldn't find anyway to control the number of options that are displayed when the user clicks on the select box. decreasing the font is the best I can come up with.
|
 |
Rachel Kumar
Ranch Hand
Joined: Oct 21, 2008
Posts: 51
|
|
|
i found out that autocomplete would be the best option but i do not know how to use it, please can you help me?
|
 |
Tom Rispoli
Ranch Hand
Joined: Aug 29, 2008
Posts: 349
|
|
|
I think you're talking about ajax stuff now so you're out of my comfort zone. sorry.
|
 |
 |
|
|
subject: Drop down box not working in IE7 but very well displayed in Mozzila
|
|
|