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

onchange and onclick event

Hi in my code i have a line

Rad2.Attributes.Add("onclick","onchange2();"); This is working
perfectly fine.When user clicks the Rad2 radiobutton onchange2();
function gets executed.

but in case i replace this line with
Rad2.Attributes.Add("onchange","onchange2();");

i face the problem. onchange2() function doesnt get executed at all in
case the check of radio button changes.

does anybody has any idea what could be the possible cause?

Jul 28 '06 #1
2 1921
Saurabh,

Even I did something similar in the past and I think that since it is a
RadioButton the Attribute should be "onclick" since this event(onclick)
changes the value of this control and the same is true with CheckBox.

But "onchange" event works for TextBox control.

Try "onchange" with TextBox it should work, but for RadioButton and
CheckBox i think "onclick" is the relevant event.

-Rishabh

Jul 28 '06 #2
no, this is for sure that onchange event exists for radio button ..i
have seen it on various sites...jst dont know y it is not executing tht
function...
ri****************@gmail.com wrote:
Saurabh,

Even I did something similar in the past and I think that since it is a
RadioButton the Attribute should be "onclick" since this event(onclick)
changes the value of this control and the same is true with CheckBox.

But "onchange" event works for TextBox control.

Try "onchange" with TextBox it should work, but for RadioButton and
CheckBox i think "onclick" is the relevant event.

-Rishabh
Jul 28 '06 #3

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

Similar topics

4
by: rick | last post by:
The following basic script works fine in firefox by not in IE. Can anyone spot the problem? In IE I can only delete the first line but not the lines created by javascript. Also, look at the HTML...
2
by: Andy Goldstein | last post by:
I have a table where all the TRs have an onClick handler registered. One (and only one) of the rows has 2 text input boxes, where each textbox has an onChange handler registered. Both the onClick...
4
by: Bart van Deenen | last post by:
Hi all I have a script where I dynamically create multiple inputs and selects from a script. The inputs and selects must have an associated onchange handler. I have the script working fine on...
3
by: b_naick | last post by:
I realize that the onChange event for a drop down can be trapped as follows: <select name="myDropDown" onChange="somefunc"> Is it possible to trap the onChange event outside of the select...
4
by: David McNerney | last post by:
Would anyone be able to tell me why I get an error in FireFox 1.5.0.1 for MacOSX when I type some text and hit Enter in the following form: <html> <body> <form action="http://example.com"...
1
by: Peter | last post by:
Hello I'm a newbie a javascript so please help me out I have a button that opens a calendar and populates a text box. I use the onclick event to open the calendar. Now the textbox has a...
1
by: bambr | last post by:
I'm using following code: function cloneRow(tBodyId, sourceRowId) { var obj = document.getElementById(tBodyId); if(obj.tagName != 'TBODY') { for(var i = 0; i < obj.childNodes.length;...
21
by: Leena P | last post by:
i want to basically take some information for the product and let the user enter the the material required to make this product 1.first page test.php which takes product code and displays...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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,...

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.