hey everybody
i have a dropdown list opening a window, ie
<SELECT onchange=openwindow()..>
<OPTION value=....
<..choice1..>
<..choice2..>
when clicking on an choice
if i clear this window, and click again
on the same choice, nothing happens
i must click another choice, and then
come back on the first, which runs
any medicine to allow a 2nd click on the same choice ?
thnx a lot
sorry for my english
Bernard, from France 8 5315
Bernard Philip wrote: hey everybody i have a dropdown list opening a window, ie <SELECT onchange=openwindow()..> <OPTION value=.... <..choice1..> <..choice2..> when clicking on an choice
if i clear this window, and click again on the same choice, nothing happens i must click another choice, and then come back on the first, which runs
any medicine to allow a 2nd click on the same choice ?
You could deselect the option
<select onchange="openwindow(); this.selectedIndex = -1;"
that way the user has to select the option again and the browsers
recognizes a change that triggers onchange.
--
Martin Honnen http://JavaScript.FAQTs.com/
Martin Honnen <Ma***********@t-online.de> writes: You could deselect the option <select onchange="openwindow(); this.selectedIndex = -1;" that way the user has to select the option again and the browsers recognizes a change that triggers onchange.
And people navigating with a keyboard will be completely lost, not
just highly annoyed as by the original solution.
Don't overuse the onchange event on selectboxes, some people will have
to go through several choises before they reach the one they want.
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
On Mon, 04 Aug 2003 14:27:40 +0200, Martin Honnen
<Ma***********@t-online.de> wrote:
Bernard Philip wrote: hey everybody i have a dropdown list opening a window, ie <SELECT onchange=openwindow()..> <OPTION value=.... <..choice1..> <..choice2..> when clicking on an choice
if i clear this window, and click again on the same choice, nothing happens i must click another choice, and then come back on the first, which runs
any medicine to allow a 2nd click on the same choice ?
You could deselect the option <select onchange="openwindow(); this.selectedIndex = -1;" that way the user has to select the option again and the browsers recognizes a change that triggers onchange.
thnx a lot for your quick answer, Martin,
and congratulations, it runs
(the name inside the dropdown-box
is blank the 2nd time, but it seems a small problem)
best regards
On 04 Aug 2003 15:31:45 +0200, Lasse Reichstein Nielsen
<lr*@hotpop.com> wrote: Martin Honnen <Ma***********@t-online.de> writes:
You could deselect the option <select onchange="openwindow(); this.selectedIndex = -1;" that way the user has to select the option again and the browsers recognizes a change that triggers onchange.
And people navigating with a keyboard will be completely lost, not just highly annoyed as by the original solution.
Don't overuse the onchange event on selectboxes, some people will have to go through several choises before they reach the one they want.
when using mouse only, the solution proposed by Martin seems ok for me
why do you use keyboard ? quicker ? mouse broken ?
regards
B.
On Mon, 04 Aug 2003 14:39:00 +0200, Martin Honnen
<Ma***********@t-online.de> wrote:
Bernard Philip wrote: hey everybody i have a dropdown list opening a window, ie <SELECT onchange=openwindow()..> <OPTION value=.... <..choice1..> <..choice2..> when clicking on an choice
if i clear this window, and click again on the same choice, nothing happens i must click another choice, and then come back on the first, which runs
any medicine to allow a 2nd click on the same choice ?
With Netscape 6/7 and with Opera 7 you could use onclick instead of onchange and do the following
<html> <head> <title>select and onclick</title> <script type="text/javascript"> function showSelectedOption (select, evt) { if (select != evt.target) { var selectedOption = select.options[select.selectedIndex]; if (selectedOption) { alert(selectedOption.text + '; ' + selectedOption.value); } } } </script> </head> <body> <p> <select onclick="showSelectedOption(this, event);"> <option value="http://www.kibo.com/">Visit GOD</option> <option value="http://www.lancearmstrong.com/">Visit the bike GOD</option> </select> </p> </body> </html>
It doesn't work with IE however
IE is the target for my pages,
so I prefer your 1st solution (index=-1)
thnx again, Martin
Bernie, from Paris
"Bernard Philip" <be************@nospam.fr> wrote in message
news:1j********************************@4ax.com... On 04 Aug 2003 15:31:45 +0200, Lasse Reichstein Nielsen <lr*@hotpop.com> wrote:
Martin Honnen <Ma***********@t-online.de> writes:
You could deselect the option <select onchange="openwindow(); this.selectedIndex = -1;" that way the user has to select the option again and the browsers recognizes a change that triggers onchange. And people navigating with a keyboard will be completely lost, not just highly annoyed as by the original solution.
Don't overuse the onchange event on selectboxes, some people will have to go through several choises before they reach the one they want. when using mouse only, the solution proposed by Martin seems ok for me why do you use keyboard ? quicker ? mouse broken ?
How about you are blind or partially sighted, and you use a screenreader to
access the web page, controlling it via the keyboard?
regards B.
Bernard Philip <be************@nospam.fr> writes: when using mouse only, the solution proposed by Martin seems ok for me why do you use keyboard ? quicker ? mouse broken ? regards
I don't, but there are people who do. Some because they like it
better, others because they have a physical condition that prevents
them from using a mouse.
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
In article <k7**********@hotpop.com>, Lasse Reichstein Nielsen <lr*@hotpop.com>
writes: when using mouse only, the solution proposed by Martin seems ok for me why do you use keyboard ? quicker ? mouse broken ? regards
I don't, but there are people who do. Some because they like it better, others because they have a physical condition that prevents them from using a mouse.
Ever tried filling out forms with a mouse? I can navigate the form quicker, and
fill it out quicker, with my keyboard than I can my mouse. Not to mention, when
I encounter a webpage that has dates in select lists, and I have to choose my
birthday, it gets annoying to scroll to the bottom to find december, then
scroll to near the bottom to find 22, then scroll almost to the bottom to find
1966. All of which I can do a lot quicker with my keyboard than my mouse. There
is more to keyboard navigation than just disabilities.
--
Randy
All code posted is dependent upon the viewing browser
supporting the methods called, and Javascript being enabled. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: yaktipper |
last post by:
This explains how to disable the view source / right-click menu in
Netscape 4, Netscape 6 and Internet Explorer (IE).
<script language="JavaScript">
//This code is the beginning of the right...
|
by: cschang |
last post by:
I have a form containing a link next to an input box. I include a
javascript function in the input by using the onblur='fuc()'. I used
this function to open another ASP page to do something and...
|
by: objectref |
last post by:
Hi to all,
i have an app that i allow a drag and drop operation of picture boxes on a
panel.
when i drop a picture box i do the following so my newly dropped picture box
will be able
to...
|
by: David J Rose |
last post by:
I am having trouble allowing a user to drag an item, whilst also allowing
them to click the item. I am using mousedown, mousemove and mouseup. It
works if I click the button carefully, but if there...
|
by: Mark Lingen |
last post by:
I've found a problem with postback event handling and webcontrol
buttons. Try out the following code in an ASP.Net project and you
will see. Create a web project in VB.Net and drop this code...
|
by: Mike Chan |
last post by:
>_< If I use the "Drag & Drop" function in the application, then the "Click"
function no more work!!!!
For example:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As...
|
by: Armando |
last post by:
I have an app (A2000) where I am letting the user move an object on the
screen. I use the OnClick for a command button event to modify the object's
Top (or Left) properties, but you can only click...
|
by: James Arnold |
last post by:
I currently have a borderless form, which I am subclassing to allow
dragging & dropping:
Protected Overrides Sub WndProc(ByRef m As Message)
Select Case m.Msg
Case 132 'Click & Drag Form...
|
by: =?Utf-8?B?bWFydGluMQ==?= |
last post by:
Hi, All,
I create button in the code ( Dim Button as new Button), not using button
web component (means not drap button and drop it ont he webform), after that
I try to use button_click event,...
|
by: Jim Devenish |
last post by:
I have an unbound form that displays all the days of the year as a
calendar. It has 12 rows of text boxes with either 29,30 or 31 in
each row. Text box names are of the form: display_01_01,...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |