473,651 Members | 2,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[<input type="checkbox" >] onSelect vs. onClick

Hi,

Does the following indeed imply that this event is NOT called when an <input type="checkbox" is toggled?
This would thus imply the usage of the onClick handler instead (assuming an action needs to be invoked on check/ uncheck).

W3C Recomendation:
18 Scripts

onselect = script [CT]
The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT
and TEXTAREA elements.

I *know* the onClick can be used, I am just wondering about the use og onSelect.

TIA,
Fermin DCG
Jul 20 '05 #1
3 37864
Well since a checkbox does not cantain any text (it's just a little box with
a check right?) then no, the onSelect probably cannot be used.

try onClick, onFocus, onBlur
"F. Da Costa" <da*****@xs4all .nl> wrote in message
news:3f******** *************@n ews.xs4all.nl.. .
Hi,

Does the following indeed imply that this event is NOT called when an <input type="checkbox" is toggled? This would thus imply the usage of the onClick handler instead (assuming an action needs to be invoked on check/ uncheck).
W3C Recomendation:
18 Scripts

onselect = script [CT]
The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements.

I *know* the onClick can be used, I am just wondering about the use og onSelect.
TIA,
Fermin DCG

Jul 20 '05 #2
Mike wrote:
Well since a checkbox does not cantain any text (it's just a little box with
a check right?) then no, the onSelect probably cannot be used.
fair enough try onClick, onFocus, onBlur did that (the onClick) and it obviously works just fine

Thx for the reply

"F. Da Costa" <da*****@xs4all .nl> wrote in message
news:3f******** *************@n ews.xs4all.nl.. .
Hi,

Does the following indeed imply that this event is NOT called when an


<input type="checkbox" is toggled?
This would thus imply the usage of the onClick handler instead (assuming


an action needs to be invoked on check/ uncheck).
W3C Recomendation:
18 Scripts

onselect = script [CT]
The onselect event occurs when a user selects some text in a text


field. This attribute may be used with the INPUT
and TEXTAREA elements.

I *know* the onClick can be used, I am just wondering about the use og


onSelect.
TIA,
Fermin DCG


Jul 20 '05 #3
@SM
"F. Da Costa" a ecrit :
Mike wrote:
Well since a checkbox does not cantain any text (it's just a little box with
a check right?) then no, the onSelect probably cannot be used.

select is select
checked is checked
why to try testing a select on an element wich only be checked or unchecked ???

<html><form>
<input type=checkbox onclick="if(thi s.checked==true ) alert('I\'m selected');">
<input type=radio name="un" value="Radio 1"
onclick="if(thi s.checked==true ) alert(this.valu e+' is selected');">
<input type=radio name="un" value="Radio 2"
onclick="if(thi s.checked==true ) alert(this.valu e+' is selected');">
<input type=text value=" nothing" onselect="alert ('No modif !'); this.blur();">
</form></html>

See your W3C if they talk about onchecked ?

fair enough
try onClick, onFocus, onBlur

did that (the onClick) and it obviously works just fine

Thx for the reply


"F. Da Costa" <da*****@xs4all .nl> wrote in message
news:3f******** *************@n ews.xs4all.nl.. .
Hi,

Does the following indeed imply that this event is NOT called when an


<input type="checkbox" is toggled?
This would thus imply the usage of the onClick handler instead (assuming


an action needs to be invoked on check/ uncheck).
W3C Recomendation:
18 Scripts

onselect = script [CT]
The onselect event occurs when a user selects some text in a text


field. This attribute may be used with the INPUT
and TEXTAREA elements.

I *know* the onClick can be used, I am just wondering about the use og


onSelect.
TIA,
Fermin DCG



--
*************** *************** *************** *************** **
Stéphane MORIAUX : mailto:st****** *************** @wanadoo.fr
Aide aux Pages Perso (images & couleurs, formulaire, CHP, JS)
http://perso.wanadoo.fr/stephanemoriaux/internet/
*************** *************** *************** *************** **
Jul 20 '05 #4

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

Similar topics

13
40714
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person filling out the form is switching from page to page...without the overhead of extra hits on the server,...
5
2640
by: prathapavp | last post by:
hi all, We r working on ERP sys and am doing crossBrowser compatibility. The problem is am not able to load one function by onClicking the refrence text . could u please help me out.
17
5814
by: malathib | last post by:
Hi, I have used a rich text editor in my application. I got it from one of the site.all are JS files. My problem is, i want to call a javascript function from the iframe. Can anybody help me in this regard
5
13348
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL http://mghospedagem.com/images/controlpanel.jpg instead of http://mghospedagem.comhttp://mghospedagem.com/images/controlpanel.jpg As u see, there's the website URL before the image URL.
0
8349
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8795
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8460
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7296
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4281
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1906
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.