473,408 Members | 1,876 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,408 software developers and data experts.

Select object events problem in classic asp

Hi,

I want to use a select object in asp and have the user pick
something from this select and have javascript open a window fired by
an event. Once the new window is open it displays another select with
data based on what was picked in the first window. Once a choice is
made in the second window, it allow users to click a submit button and
pass back the chosen value to the calling window.
Let's say the first window has a select with two choices:

Red
Blue

Let's assume the user picks blue and the second window is opened.

Now, I tried using the onchange and the onclick events to open the
new window. Here are the results.
1.By putting the open window code in onchange event the second
window opens fine . Unfortunately it's possible that the user could
close the second window accidentally without hitting the submit button
and nothing would be passed back to the calling window. This would
require hitting "blue" again to reopen the window. However the
onchange event doesn't fire unless a new value is picked; clicking
"blue" does nothing. So I abandoned that.
I then tried onclick. This works fine in that it will always fire
once the user clicks on a choice in the select object. However it has
behavior that would drive my users crazy.

Usually, with a select object, you can click once which exposes
the dropdown list and leaves it exposed, even if you release the left
mouse button.
It just sits there and gives you the chance to leisurely choose what
you want.
In this case, when I used the onclick event to open the second
window, it exposed the dropdown list, but the second I let go of the
left mouse button the event was fired, my javascript took over and the
second window was opened and the first window (where the list was) was
obscured.

It does work if you don't let go of the left mouse button and move
immediately to your choice, but I think this will drive my users
crazy. I would like the select to function as it normally does but
also to have it fire my javascript each time a choice is made in the
select in the first window. Any ideas?

Neil
Jul 23 '05 #1
1 1805
On 7 Apr 2004 20:34:24 -0700, fig000 <ne***********@yahoo.com> wrote:

[snip]
Let's say the first window has a select with two choices:

Red
Blue

Let's assume the user picks blue and the second window is opened.

Now, I tried using the onchange and the onclick events to open the
new window. Here are the results.

1.By putting the open window code in onchange event the second
window opens fine. [...]


You should never perform an action (such as opening a window, following a
link, etc) based on the onchange event.

Use a separate button.

Mike

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 23 '05 #2

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

Similar topics

2
by: mark4asp | last post by:
Why does this not work in Mozilla ? <http://homepage.ntlworld.com/mark.pawelek/code/animals.html> The optHabitat_change() event does not fire. What am I doing wrong here? PS: It should...
5
by: Martin Bischoff | last post by:
Hi, is it possible to modify the values of a SqlDataSource's select parameters in the code behind before the select command is executed? Example: I have an SqlDataSource with a...
5
by: Michael Moreno | last post by:
Hello, In a class I have this code: public object Obj; If Obj is a COM object I would like to call in the Dispose() method the following code: ...
7
by: skeddy | last post by:
In a nutshell, I'm trying to dynamically create a select box with ResultSet code in vbscript and then need to be able to access the value of that select box later with a Save button. I've got...
12
by: Doug | last post by:
Hi, I learned a little about the model view presenter pattern at a conference this last week and am experimenting with it. It's working pretty well but I have a question. I am trying to use...
11
by: Andrus | last post by:
I'm implementing entity object which should populate its properties from database when property is first referenced. In RDL reports I use object properties like MyObject.MyProperty MyObject...
0
by: murtyin | last post by:
Hi to All, I created one ClassLibrary in .Net using VB.Net, which is configured for COM InterOP. In this Library, I created 3 classes and below they are. (1) Document class: which is having 2...
0
by: =?Utf-8?B?RmFicml6aW8gQ2lwcmlhbmk=?= | last post by:
I need to access classic ASP intrinsic objects and their properties from a ..net assembly wrapped to COM. The COM .net assembly is then instanciated from a classic ASP page with...
2
by: DuncanIdaho | last post by:
Hi Apologies if this is similar to a (very) recent post. I was wondering if it is possible to execute an update query that contains a select statement on an MS access 2000 database. I have...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
jinu1996
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...
0
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...
0
tracyyun
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...
0
isladogs
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...

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.