Ask a Question related to ASP.NET General, Design and Development.
-
Simon Brown #1
javascript disabled radiobutton doesn't get enabled in asp.net
Hi,
here's the code, i have removed the irrelevent stuff
<HEAD>
<title>WebForm1</title>
<script language="javascript">
function DisableRadio()
{
document.Form1.RadioButton1.disabled = true;
}
</script>
</HEAD>
<body onload="DisableRadio()">
<asp:RadioButton id="RadioButton1" runat="server" Width="48px"
Height="42px"></asp:RadioButton>
</body>
I disable the button using DisableRadio() javascript function...
then i try to enable it using the following asp.net code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
CheckBox1.Enabled = True
End Sub
it doesn't get enabled... why? Does the body_onload is called after
Page_Load??
what am i doing wrong?
Simon Brown Guest
-
All website connections are disabled. At least oneconnection must be enabled to choose a file or folder on awebsite
Hi There, I have a website running on : Windows 2003, IIS 6.0, ColdFusion MX 7 and Contribute 3.0 with Contribute Publishing Services 1.1 ... -
Detect if Javascript & Cookies Enabled
Hi, DWMX using VBSCRIPT + some simple javascript (and DWMX form validation which uses javascript) I also use session variables, which I believe... -
Enabled / Disabled my control
Hi, My Control (inherits from System.Web.UI.Control) has the Enabled property that enabled a button inside of my control. The problem is that in... -
Given that some browsers dont have javascript enabled....
Given that some browsers dont have javascript enabled.... do developers try to avoid using javascript when a php alternative can be used? What sort... -
Problem using .NET UniqueID to reference RadioButton in Javascript?
Hi, all. I'm trying to work with some client-side scripting issues with an ASP.NET application. I realize I've probably done something wrong, but... -
DWinter #2
Re: javascript disabled radiobutton doesn't get enabled in asp.net
Yes, your assumption is correct. The Private Sub Page_Load is called first
to create the html to stream to the client, then the browser runs the html,
which runs the body onload event.
"Simon Brown" <flowinlife@hotmail.com> wrote in message
news:dc1895a6.0308080009.15f4221b@posting.google.c om...> Hi,
>
> here's the code, i have removed the irrelevent stuff
>
> <HEAD>
> <title>WebForm1</title>
> <script language="javascript">
> function DisableRadio()
> {
> document.Form1.RadioButton1.disabled = true;
> }
> </script>
> </HEAD>
> <body onload="DisableRadio()">
> <asp:RadioButton id="RadioButton1" runat="server" Width="48px"
> Height="42px"></asp:RadioButton>
> </body>
>
> I disable the button using DisableRadio() javascript function...
> then i try to enable it using the following asp.net code
>
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> 'Put user code to initialize the page here
> CheckBox1.Enabled = True
> End Sub
>
>
> it doesn't get enabled... why? Does the body_onload is called after
> Page_Load??
> what am i doing wrong?
DWinter Guest



Reply With Quote

