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

adding javascript to radial button group

I've added javascript function calls to an HTML control, but I can't seem to
get the syntax to work for individual radio buttons as part of an
ASP:RadioButtonGroup control.

Here's the syntax I'm using on the page_load function:

radioGroup_emailGroup.Items(0).Attributes.Add("onC lick", "emailAll();")
radioGroup_emailGroup.Items(1).Attributes.Add("onC lick",
"emailAttendees();")
radioGroup_emailGroup.Items(2).Attributes.Add("onC lick",
"emailWaitingList();")

It's not giving me an error, but it's not creating an 'onclick' attribute
for the generated HTML either.

-Darrel
Nov 18 '05 #1
2 1946
If you are using an ASP.NET radio button, then you should use the
"CheckedChanged" event other than "onclick"
AS you can see, onclick event is not exist in the ASp.NET radio button
properties.

hope it helps

wei chung

"Darrel" wrote:
I've added javascript function calls to an HTML control, but I can't seem to
get the syntax to work for individual radio buttons as part of an
ASP:RadioButtonGroup control.

Here's the syntax I'm using on the page_load function:

radioGroup_emailGroup.Items(0).Attributes.Add("onC lick", "emailAll();")
radioGroup_emailGroup.Items(1).Attributes.Add("onC lick",
"emailAttendees();")
radioGroup_emailGroup.Items(2).Attributes.Add("onC lick",
"emailWaitingList();")

It's not giving me an error, but it's not creating an 'onclick' attribute
for the generated HTML either.

-Darrel

Nov 18 '05 #2

Darrel,

It's a known problem.

See http://support.microsoft.com/default.aspx?scid=kb;[LN];309338

Eliyahu

"Darrel" <no*****@nospam.com> wrote in message
news:Oq**************@TK2MSFTNGP10.phx.gbl...
I've added javascript function calls to an HTML control, but I can't seem to get the syntax to work for individual radio buttons as part of an
ASP:RadioButtonGroup control.

Here's the syntax I'm using on the page_load function:

radioGroup_emailGroup.Items(0).Attributes.Add("onC lick", "emailAll();")
radioGroup_emailGroup.Items(1).Attributes.Add("onC lick",
"emailAttendees();")
radioGroup_emailGroup.Items(2).Attributes.Add("onC lick",
"emailWaitingList();")

It's not giving me an error, but it's not creating an 'onclick' attribute
for the generated HTML either.

-Darrel

Nov 18 '05 #3

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

Similar topics

5
by: Carl Gilbert | last post by:
Hi I have some ASP code that I want to run from CD within a VB.NET windows application with a web browser control. However, to get the ASP pages to run without a server is proving quite...
4
by: Dmitry Korolyov [MVP] | last post by:
When we use btnSubmit.Attributes = "javascript: this.disabled=true;" to make the button disabled and prevent users from clicking it again while form data still posting, there is no longer...
8
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
3
by: VMI | last post by:
I know this isn't the best group to post aspnet question, but the MS asp.net NG hasn't been very helpful lately. I've been trying to add a messagebox following the examples I've seen on the web,...
2
by: Muzzy | last post by:
Hi, I've used information on these newsgroups to build many pages. So I thought that now that I have my script working (something that I've been working on for about a week), I should post it so...
4
by: Rob | last post by:
Hi, Is there anything wrong with this code or does new Option just not work very well. I have a select box on my form: <select name="FirstLine" size="5" style="width:122px;"> </select> and I...
7
by: julian.tklim | last post by:
Hi, I need to build an editable Datagrid with add & delete buttons on each row using javascript. DataGrid need not be pre-populated with values. To make the thing complicated, one of the...
5
by: alanb | last post by:
Hi, hope someone can help, I need to be able to keep a running total of radio buttons selected, as a user goes through a set of 16 questions, devided in to 4 catorgories, then on "submit" have the...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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?
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
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,...
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
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 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.