Hi everyone,
I've got an older piece of code that was written specifically for IE that works great. In short, we've got two buttons (pending and approved) and a window below them. When each button is pressed, the appropriate list is populated in the window. However, we're also changing the label in a line of text to the appropriate category.
IE works perfectly, but Netscape changes the list, but not the label. When I run it with alerts, typeof window.lblFilter comes back as "undefined" or "string" in Netscape, not "object" as I'm hoping form.
Any suggestions are much appreciated! Thanks, Julia
Code:function SetListTitle(sList){ if(navigator.appName=="Microsoft Internet Explorer"){ if(typeof window.lblFilter == "object"){ if(sList == "Pending"){ window.lblFilter.innerHTML='<font color=red>PENDING</font>'; }else{ window.lblFilter.innerHTML='<font color=blue>Approved</font>'; } } } if(navigator.appName=="Netscape"){ if(typeof window.lblFilter == "undefined"){ if(sList == "Pending"){ window.lblFilter.innerHTML='<font color=red>PENDING</font>'; }else{ window.lblFilter.innerHTML='<font color=blue>Approved</font>'; } } } }Code:<table> <tr> <td align="right" colspan="4"> <p align="center"> You are now viewing the Distributor Registration <u><b><label name="lblFilter" id="lblFilter"><font color=red>PENDING</font></label></b></u> List </td> </tr> <tr> <td colspan="4"> <iframe name="DistList" id="DistList" width="520" height="172" src="DistList.asp?ID=<%=sDistID%>&Filter=<%Session("DistListFilt")%>" scrolling="yes"></iframe> </td> </tr> <%End If%> </table> <% If Session("DistListFilt") = "Approved" Then Response.Write "<script>SetListTitle('Approved')</script>" Else Response.Write "<script>SetListTitle('Pending')</script>" End If %>




Bookmarks