Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / JScript / April 2008

Tip: Looking for answers? Try searching our database.

Enable an asp control runat server via javascript, until this control is not enable from server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fabio Mastria - 27 Mar 2008 16:39 GMT
I have seen that if I put a radiolistbutton on a page with 3 radiobutton and
the first (as example) is not enable at design time (so server side), i
can't enable it from javascript with something like this

var btlList = document.form1.elements["RadioButtonList1"];

btlList[0].disabled = false;

This because of its rendering in HTML

<table id="RadioButtonList1" border="0">
   <tr>

 <td><span disabled="disabled"><input id="RadioButtonList1_0" type="radio"
name="RadioButtonList1" value="pippo" disabled="disabled" /><label
for="RadioButtonList1_0">pippo</label></span></td>
</tr>

<tr>
 <td><input id="RadioButtonList1_1" type="radio" name="RadioButtonList1"
value="pluto" /><label for="RadioButtonList1_1">pluto</label></td>
</tr><tr>
 <td><input id="RadioButtonList1_2" type="radio" name="RadioButtonList1"
value="paperino" /><label for="RadioButtonList1_2">paperino</label></td>
</tr>
</table>

Do you see? There's a "span" which is disabled. So from javascript i can
enable the radioButton, but the span is still disabled, so the children..
radiobutton

I can solve that? PLS HELP!

Thank you all
Anthony Jones - 03 Apr 2008 23:06 GMT
> I have seen that if I put a radiolistbutton on a page with 3 radiobutton and
> the first (as example) is not enable at design time (so server side), i
[quoted text clipped - 28 lines]
>
> I can solve that? PLS HELP!

var btn = document.getElementById("RadioButtonList1_0")
btn.disabled = false
btn.parentNode.disabled = false

Signature

Anthony Jones - MVP ASP/ASP.NET


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.