473,473 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

HTML Select, OnChange on <option>?

@sh
Hi guys,

As far as I understand it, there is no possible way to add an
OnSelect/Onchange to an actual <option> within a select tag (to perhaps jump
to a page or run a DOM command), is this still correct with modern client
browser advances (obviously taking into account the incompatibilities of
this method with older browsers).

Cheers, Ash
Jul 23 '05 #1
2 9929
@sh wrote:
As far as I understand it, there is no possible way to add an
OnSelect/Onchange to an actual <option> within a select tag


Use the select element's onchange handler and it's selectedIndex
property instead.

ciao, dhgm
Jul 23 '05 #2
@sh
"Dietmar Meier" <us***************@innoline-systemtechnik.de> wrote in
message news:3d*************@individual.net...
@sh wrote:
As far as I understand it, there is no possible way to add an
OnSelect/Onchange to an actual <option> within a select tag


Use the select element's onchange handler and it's selectedIndex
property instead.

ciao, dhgm


Ahhhh ok cool, shame its not a little simpler though and accessible directly
from the <option> tag.

Cheers, Ash
Jul 23 '05 #3

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

Similar topics

6
by: George Hester | last post by:
What's this? IE has a simple way using an ActiveX object so that I can load a text file into the <OPTION>s like a database. It is called Tabular Control. But I doubt this is going to work with...
1
by: Robert Kattke | last post by:
I'm designing a site for local music and entertertainment and have a few ?s that need to be cleared up. Currently, I'm working on the Club part and have a Contact Person form, and a Club form. ...
1
by: Raterus | last post by:
Hi there, Should I be concerned with a malicious user spoofing a postback by changing the values for a control like the dropdownlist found in the rendered <option> tags. I would hope asp.net...
6
by: Chris Fink | last post by:
Does anyone know it is possible to include a small image(.gif .jpeg) within a <SELECT><option> so that the user would see the option text as well as a little image(icon) in the option? I know this...
5
by: Cylix | last post by:
My code works under MS IE6, but not work on Firefox and Mac IE5.1.2 Mac IE5.1.2 response: 'options' is not an object function to check leap year Source code:...
7
by: Shrek | last post by:
I have a drop down on a web page and want to change the cursor from default to pointer, so my style definition has style ="cursor: pointer;" the drop down though fails to change from the...
9
by: Man-wai Chang | last post by:
For a form POST, what's the difference between: 1. <option</option> 2. <option>&nbsp;</option> -- iTech Consulting Services Limited Expert in ePOS (Point-Of-Sales) solutions Website:...
3
by: ganeshp | last post by:
#include<iostream> #include<vector> using namespace std; class option { };
14
by: The Natural Philosopher | last post by:
This is a nasty one and I can't see my way out of it. I have a bunch of select statements in a form, and each select statement has an onchange="do_something(this)" in it, and this works...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
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...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.