473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Selected item of selection box not visible during display

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 !!

Oct 23 '06 #1
3 1861
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 !!
here is one possible solution (if i understood right):

lets say your form action is validate_form.php
make it validate_form.php#begin
and add <a name="begin"to the line that should appear on the very top of the screen after submitting
Oct 23 '06 #2
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
Oct 23 '06 #3
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
Oct 28 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Randy Rubin | last post by:
Does anyone know how to Make an Item selected in a DropDownListBox when Binding it to data. When it changes it populates another TextBox but the DDLB does not retain it's selected value. Thanks...
0
by: Brian Henry | last post by:
Since no one else knew how to do this I sat here all morning experimenting with this and this is what I came up with... Its an example of how to get a list of items back from a virtual mode list...
2
by: Srimadhi | last post by:
Displaying selected items at the top of the listbox Hi, I am having two listboxes - one with ids and second with the related names. When user selects an item in one listbox, the corresponding...
2
by: Hitesh | last post by:
I have a listbox and the values get selected (highlighted) from code. I can highlight the corresponding list box items, but they do not show in the listbox I have to scroll through the list box to...
11
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
3
by: peter.mosley | last post by:
I've tried googling for the answer to this problem, without any luck. I'm sure the truth must be out there somewhere! I have a multiselect listbox populated with many items (set by the RowSource...
1
by: sheenaa | last post by:
Hello friends, I m using ASP.NET with C# 2005 and SQL SERVER 2005 for the ASP.Net Website. I m using sqldatasource to connect and retrieve the data from database and then it displays the data...
0
by: Geary | last post by:
I have a drop down list on an asp.net 2 page that is bound to a table. By default it displays the first item as the selected item. But I want to make sure that the user must change the selection. ...
0
by: divya1949 | last post by:
Create a windows c# application which will Read a xml file and populate nodes in the treeview. 1 On selection of treenode display the child nodes of that node in listview control 2. ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.