Solved

<option selected value ...> problem.

Posted on 1998-09-14
5
215 Views
Last Modified: 2013-12-25
The following HTML generates a Drop Down List with a selected value that is (deliberately for the purpose of this question) outside the Drop Down List Window.
I have found that when viewing with IEXP V3.02 the option is selected AND the list is automatically scrolled so that it appears within the Drop Down List Window.
However when viewing with IEXP4.0 (4.72.2106.8) the option is selected but not displayed, you have to manually scroll down to see it.
I have experimented and it seems to be browser specific as it happens in both PWS and II3.
I want my application to be Browser independent so I need a way around this.
Incidentally I have some drop down lists that are generated from code and the same occurs.

Any help would be greatly appreciated.

<tr>
      <td width="50%"><strong><font color="#FF0000">What are you going to do?</font></strong></td>
      <td width="50%"><select name="ipWhatToDo" size="2">
        <option value="Delete This Item">Delete This Item</option>
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option selected value="Edit These Details">Edit These Details</option>
      </select></td>
    </tr>

0
Comment
Question by:rogerb082098
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 28

Expert Comment

by:sybe
ID: 1854991
I checked in Netscape 3 & 4, neither one shows the selected options (as does IE 3 as you say). I haven't been able to check IE3.

I tried some javascript functions to set focus on the selected option, but nothing seems to work :(.

Maybe someone else knows.
0
 
LVL 1

Expert Comment

by:Bluemoon
ID: 1854992
It wont be possible to put the "edit these details" option on top?
the top one is always shown....
0
 
LVL 4

Accepted Solution

by:
rafistern earned 50 total points
ID: 1854993
If you use size=1 (a drop down list as opposed to a scroll list) then the selected item will always come out on top. Maybe that is what you should do.
0
 

Author Comment

by:rogerb082098
ID: 1854994
Thanks for the answer buts its more of a workaround trhan a solution. Why does it work OK it IE3 but NOT in IE4?
20 points.
0
 
LVL 4

Expert Comment

by:rafistern
ID: 1854995
The ways of Bill Gates (and his programmers) they be wonderous.. Need we say any more?
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question