Hi -- I have a scritp that attempts to find a drop down control on a page using the getelementbyid method. It works in IE 7, but not in FireFox or IE8. I've read up on the topic and most say that it is cause by passing the element name to the method instead of the element id. I am passing the element id.
HEre is the code ---
HTML for the dropdown is
<TD vAlign="baseline" noWrap>
<TD vAlign="baseline" noWrap><FONT face="Arial"><asp:dropdownlist id=ddlSubtopic runat="server" Width="286px" DataSource="<%# dstopics %>" DataMember="table2" DataTextField="tt" DataValueField="topicid"></asp:dropdownlist></FONT></TD>
nSubtopics = document.getElementById('_ctl0_ContentPlaceHolder1_ddlSubTopic').options.length
Oh and I negleted to metion that I am using Master pages. that's why in the script the field name is _ctl0_ContentPlaceHolder1_ddlSubTopic.
Any help would be appreciated.