getElementById() is a javascript function that finds a specified element on a page it can be a form or page element. in this case I'm trying to disable/enable radio buttons.
Adrian Lynch wrote: > Is getElementById a method of a form? > > Shouldn't it just be document.getElementById()? > > Adrian > > >> -----Original Message----- >> From: Scott Stewart [mailto:saste...@email.unc.edu] >> Sent: 13 January 2009 16:30 >> To: cf-talk >> Subject: Javascript compatibility question >> >> Hey all, >> >> I'm trying to disable radio button based on a selection. These >> functions >> are called from an onClick. >> Any reason why they'd work in Firefox and not in IE 7? >> >> >> >> <script language="javascript" type="application/javascript"> >> function disableOnPaidLeave(){ >> document.form1.getElementById("pre_absent").disabled=true; >> >> document.form1.getElementById("alternative_week_id").disabled=true; >> >> document.form1.getElementById("pre_pretransplant").disabled=true; >> >> document.form1.getElementById("pre_pediatric_clinic").disabled=true; >> >> document.form1.getElementById("pre_absent_n").disabled=true; >> >> document.form1.getElementById("pre_pretransplant_n").disabled=true; >> >> document.form1.getElementById("pre_pediatric_clinic_n").disabled=true; >> } >> >> function enableOnPaidLeave(){ >> document.form1.getElementById("pre_absent").disabled=false; >> >> document.form1.getElementById("alternative_week_id").disabled=false; >> >> document.form1.getElementById("pre_pretransplant").disabled=false; >> >> document.form1.getElementById("pre_pediatric_clinic").disabled=false; >> >> document.form1.getElementById("pre_absent_n").disabled=false; >> >> document.form1.getElementById("pre_pretransplant_n").disabled=false; >> >> document.form1.getElementById("pre_pediatric_clinic_n").disabled=false; >> } >> </script> >> >> -- >> Scott Stewart >> ColdFusion Developer >> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317867 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4