|
Posted by Colin Fine on 10/28/06 16:50
Erwin Moller wrote:
> rukkie wrote:
>
>> I've made a webform in which some selection boxes are incorporated.
>> Once the form is submitted the user can display the form again and all
>> the options selected are highlighted (via the "selected" keyword). The
>> only thing what bothers me is that sometimes the selected option is not
>> visible ; one has to scroll down the selection box to see the
>> highlighted item. Is there anyone who has experienced the same and
>> found a solution for this "small" problem.
>> Thanks in advance !!
>
> Hi rukkie,
>
> Well, that is not excactly a browser SHOULD do.
> The browser is just displaying the whole multiple selectbox.
>
> But if memory serves me well, I solved that 'problem' once via JavaScript.
> By adding some javascript that unselected, then reselected the first option.
>
> The browsers I tested it on all jumped to the first selected index after
> that. Of course that will only work if JavaScript is enabled.
>
> But this has nothing to do with PHP.
> PHP only generated the HTML your browser is displaying.
> With these kind of questions you might get luckier in a HTML newgroup, or
> JavaScript newsgroup.
>
> Good luck.
>
> Regards,
> Erwin Moller
I don't believe there is a specification anywhere of exactly what user
agents should display in this case. It is annoying, but sometimes, on
some browsers, the highlighted entry is not in the visible part of popup.
I think the Javascript solution is the only one that has a chance of
working - but even then, the behaviour of the browser is not defined.
Colin
Navigation:
[Reply to this message]
|