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

Unable to re-enable a radio button if disabled server-side

Hi All,

I've come across the problem of not being able to re-enable a radio
button with javascript if its initial state has been disabled in the
Page_Load() method of the code behind.

Might i add that it behaves fine in Firefox, but IE is unable to
re-enable the radio button. IE is fine if the radio button starts in an
enabled state.

Version of IE i'm using is 6, and i have also tried with IE7 and got
the same result.

Is this a bug specific to IE ?

Any help would be appreciated, thanks.
- Sam

Mar 1 '06 #1
2 2284
xazos79 wrote:
Hi All,

I've come across the problem of not being able to re-enable a radio
button with javascript if its initial state has been disabled in the
Page_Load() method of the code behind.

Might i add that it behaves fine in Firefox, but IE is unable to
re-enable the radio button. IE is fine if the radio button starts in an
enabled state.

Version of IE i'm using is 6, and i have also tried with IE7 and got
the same result.

Is this a bug specific to IE ?

Any help would be appreciated, thanks.
- Sam

========================

Hi There

<script>
function enable()
{
var controls = document.getElementsByTagName("input");
NumElements = controls.length;

for (i=0;i<NumElements;i++)
{
if(controls[i].name=="rdEnable")
{
controls[i].setAttribute("disabled" , false);
ParentSpanControl = controls[i].parentElement;
ParentSpanControl.setAttribute("disabled" , false); break;
}
}

return false;
}
</script>

Explanation:
============
A DotNet Radio Button Control will result in creation of the following
three controls

1.Span Control
2.Input Type=Radio
3.Label

So using javascript , do identify all the controls that radio button is
rendered to and set their disabled propery to false;

Please find the above code which does the same
Mar 1 '06 #2
Cheers for the reply. I might give your suggestion a try. As a work
around i just used some javascript and registerd it in the codebehind
as a startup script to perform the enabling/disabling. Seems to work
fine.

Mar 1 '06 #3

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

Similar topics

2
by: lawrence | last post by:
I'm probably missing something obvious, but I'm unable to write a file with this function. I've used my FTP software to set permissions to 777 on all the files in question. I've tried r, r+, w, and...
0
by: FabFreddy | last post by:
Hi, I can't find out what the problem is with the error message below! I get it when I go from one to another page with controls in these pages. Anyone knows??? THX Unable to validate...
0
by: maxim mat | last post by:
Hi I need to build client for web service. But when I'm using Visual Studio .NET to add Web Reference, I get error: "Custom tool error: Unable to import WebService/Schema. Unable to import...
0
by: George Harig | last post by:
While building my deployment project I receive the following error Unable to build folder named "FOLDER_NAME". My projects compiles fine, the deployment project dose not. Are there any rules...
1
by: A Traveler | last post by:
Hello, i am having this problem. The exact error message is: "Unable to generate code for a value of type 'System.Web.UI.Page'. This error occurred while trying to generate the property value for...
0
by: Michael R. Pierotti | last post by:
Has anyone seen this error before when trying to make the install on a program. ------ Starting pre-build validation for project 'HafaSMPPInstall' ------ WARNING: Unable to find dependency...
3
by: DJTN | last post by:
I'm getting the following error when I try to compile my setup project in VS 2002. I have re-installed the .net framework 1.1 and it didnt solve the problem. WARNING: Unable to find dependency...
0
by: hlyall1189 | last post by:
Hi, I recently started upgrading some of my old vs 2003 apps to vs 2005 and used the conversion tool but now i get the following error after building the page. I have typecasted the lines as...
1
by: sathyp | last post by:
Public Function SetPrinterDefaultsW(ByVal sPrinterName As String, _ ByVal nPaperSize As Long, ByVal nOrientation As Long) As Boolean Dim Prn As Printer Dim hPrinter As Long Dim pd As...
4
by: =?Utf-8?B?SnVhbiBEZW50?= | last post by:
Hi, I am getting the following in a VC++ EXE (using VS2005) that links several C++ DLLs and uses MFC and ATL, when I try to start it under the debugger: ------- 'Exactus.UX.Studio.v1.exe':...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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: 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
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...

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.