This is a migrated thread and some comments may be shown as answers.

[Solved] Getting Microsoft JScript runtime error: Object doesn't support this property or method

3 Answers 392 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Donna Stewart
Top achievements
Rank 1
Donna Stewart asked on 27 Aug 2010, 05:19 PM
UPDATE:  I am only getting this error in IE8.  I do not get it in FireFox.  Not sure of other browsers or versions of IE.  I am still having the issue with the Telerik DropDownList, but I have posted a thread under the ComboBox topic.  If anyone has any idea as to why I am getting this error in IE, I would really appreciate your help!

I am at my wits end.  I am trying to use the new Window and ComboBox(as dropdown) extensions.  I have fooled with this for 2 days, trying different variations of scriptRegistrar, etc. etc.  The window works, and I am getting the field for the dropdown with my first value in the list, but no dropdown functions.  I get the error when I click to go to the page with the link to the window.  The dropdown is in my partial view which is the popup window. I then hit continue and can get to the page and click the link to pop up the window.  Can someone please help me?!  Any help is very much appreciated!  The code follows...

Thanks,
Donna

Here is my Site.Master
<%@ Master Language="VB" Inherits="System.Web.Mvc.ViewMasterPage" %>
<%-- The following line works around an ASP.NET compiler warning --%>
<%: ""%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head runat="server">
    <%: Ajax.GlobalizationScript()%>
    <title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
    <link href="../../Content/Site.css" rel="stylesheet" type="text/css" />
    <%= Html.Telerik().StyleSheetRegistrar() _
                            .DefaultGroup(Function(group) group.Add("telerik.common.min.css")) _
                            .DefaultGroup(Function(group) group.Add("telerik.gmctelerik.css")) _
                            .DefaultGroup(Function(group) group.Add("jqModal.css"))
    %>
<%--    <script type="text/javascript" src="/Scripts/2010.2.825/jquery-1.4.2.min.js"></script>
--%><%--    <script type="text/javascript" src="/Scripts/homeScripts/mainContent.js"></script>
--%>    
<%--<script type="text/javascript" src="/Scripts/curvycorners.js"></script>
--%></head>
  
<body>
    <div>
        <asp:ContentPlaceHolder ID="MainContent" runat="server" />
    </div>
    <%= Html.Telerik.ScriptRegistrar().Scripts(Function(s) s.Add("/2010.2.825/telerik.combobox.min.js"))
    %>
</body>
</html>

Here is the PublicSite.Master
<%@ Master Language="VB" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="false" CodeBehind="PublicSite.master.vb" Inherits="gmcps.PublicSite"%>
  
<%@ Import Namespace="gmcps" %>
<%@ Import Namespace="GMCResources.My.Resources" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="publicpage">
        <div id="publicheader">
            <asp:Image runat="server" ImageUrl="~/Content/Images/GMCPublicHeader.png" Height="104px" Width="843px"/>
        </div>
        <div style="float:left">
            <%: Html.LanguageSelectorLink("en-US", "[English]", "English", Nothing, "lang", False)%>
            <%: Html.LanguageSelectorLink("pt-BR", "[Portuguese]", "Portuguese", Nothing, "lang", False)%>
        </div>
        <div class="gmcmenu" style="float:right">
        <%= Html.Telerik.Menu() _
        .Name("HomeMenu") _
        .BindTo(CType(ViewData("publicMenu"), IEnumerable(Of gmcps.PublicMenu)),
                        Sub(mappings)
                            mappings.For(Of PublicMenu)(
                            Sub(binding)
                                binding _
                                    .ItemDataBound(
                                        Sub(item, publicMenu)
                                            item.Text = publicMenu.mainMenuItem.Text
                                            If Not String.IsNullOrWhiteSpace(publicMenu.mainMenuItem.ActionName) Then
                                                If publicMenu.mainMenuItem.ActionName.Equals("home") Or publicMenu.mainMenuItem.ActionName.Equals("LogOn") Then
                                                    item.Action(publicMenu.mainMenuItem.ActionName, publicMenu.mainMenuItem.ControllerName, New With {.theAction = publicMenu.mainMenuItemPage})
                                                              
                                                Else
                                                    item.Action("showContentPage", publicMenu.mainMenuItem.ControllerName, New With {.theAction = publicMenu.mainMenuItemPage})
                                                End If
                                            End If
                                        End Sub) _
                                    .Children(
                                    Function(publicMenu)
                                        Return publicMenu.subMenuItems
                                    End Function)
                            End Sub)
                            mappings.For(Of Telerik.Web.Mvc.UI.MenuItem)(
                            Sub(binding)
                                binding.ItemDataBound(
                                    Sub(item, subMenu)
                                        item.Text = subMenu.Text
                                        If Not String.IsNullOrWhiteSpace(subMenu.ActionName) Then
                                            If subMenu.ActionName.Equals("ROI_study1") Then
                                                item.Action("roiCaseStudy", "SubContent", New With {.id = 1})
                                            ElseIf subMenu.ActionName.Equals("ROI_study2") Then
                                                item.Action("roiCaseStudy", "SubContent", New With {.id = 2})
                                            Else
                                                item.Action("showSubContentPage", "SubContent", New With {.subAction = subMenu.ActionName})
                                            End If
                                        End If
                                    End Sub)
                            End Sub)
                        End Sub)
            %>
        </div>
        <asp:ContentPlaceHolder ID="OtherContent" runat="server" />
        <div class="footerbuttons">
            <%= Html.ImageLink("showSubContentPage", "SubContent", New With {.subAction = "services_invmgmt"}, "/Content/Images/InvoiceManagement.png", "Invoice Management")%>
            <%= Html.ImageLink("showSubContentPage", "SubContent", New With {.subAction = "services_analytics"}, "/Content/Images/SpendAnalytics.png", "Spend Analytics")%>
            <%= Html.ImageLink("showSubContentPage", "SubContent", New With {.subAction = "services_visibility"}, "/Content/Images/SpendVisibility.png", "Spend Visibility")%>
            <%= Html.ImageLink("showSubContentPage", "SubContent", New With {.subAction = "services_optimization"}, "/Content/Images/NetworkOptimization.png", "Network Optimization")%>
            <%= Html.ImageLink("showSubContentPage", "SubContent", New With {.subAction = "services_rfpmgmt"}, "/Content/Images/RFPManagementpng.png", "RFP Management")%>
        </div>
        <div id="footer">
            <%= GMCContent.Copyright%>    
            <img alt="mountains" src="/Content/Images/ClassicSiteIcon.png" style="float:none"/>    
            <a class="greenlink" href="<%= GMCContent.privacyUrl %>"><%= GMCContent.privacylink%></a>
        </div>
    </div>
</asp:Content>
Here are the views:
Index.aspx
  
<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/PublicSite.master" Inherits="System.Web.Mvc.ViewPage(Of gmcps.MainContentViewModel)" %>
<%@ Import Namespace="gmcps" %>
  
<asp:Content ID="indexContent" ContentPlaceHolderID="OtherContent" runat="server">
    <%Html.BeginForm()%>
    <div id="publiccontent">
        <%Html.RenderPartial(Model.partialViewName)%>
    </div>
    <%Html.EndForm()%>
</asp:Content>
  
MainContent.ascx
<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl" %>
<div id="publicmaincontent" class="maincontentclass"
     style="background-image:url(<%=Model.mainContentImage%>); background-repeat:no-repeat;">
    <div id="maincontentright">
        <p class="publiccontentheader"><%= Model.mainContentTitle%></p>
        <p class="publiccontenttext"><%= Model.mainContentText%></p>
         <%  If Model.mainContentSubMenuList.Count > 0 Then %>
                <ul id="submenu">
                <% For Each MenuItem In Model.mainContentSubMenuList%>
                    <li><%= Html.ActionLink(MenuItem.Text, "showSubContentPage", "SubContent", New With {.subAction = MenuItem.ActionName}, Nothing)%></li>
                <%  Next %>
                </ul>
         <% End If%>
        <a href="#" id="popup">Open Telerik Window</a>
        <span id="salespopup" class="windows7">
            <%  Html.Telerik().Window().Name("Window") _
                .LoadContentFrom("salesRepresentatives", "Home") _
                .Buttons(Function(buttons) buttons.Refresh().Maximize().Close()) _
                .Draggable(True) _
                .Height(350) _
                .Width(450) _
                .Resizable() _
                .Visible(False) _
                .Title("Find Your Sales Representative") _
                .Render()
             %>
        </span>
    </div>
</div>
<%  Html.Telerik().ScriptRegistrar().OnDocumentReady("$('#popup').bind('click', function openWindow(e){ $('#Window').data('tWindow').open();})")%>
  
salesRepresentatives.ascx - popup Window
  
<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl(Of IEnumerable (Of gmcps.StateItem))" %>
    <div  style="padding-left:10px; padding-top:15px;">
    Please choose a state:
    <%= Html.Telerik().DropDownList.Name("stateList") _
    .BindTo(New SelectList(Model, "stateId", "stateName"))%>
   </div>
    <div id="salesRepInfo"></div>

Here is the rendered html for the page where I get the error:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head><script type="text/javascript" src="http://ajax.microsoft.com/ajax/4.0/1/globalization/en-US.js"></script><title>
      
  
</title><link href="../../Content/Site.css" rel="stylesheet" type="text/css" /><link type="text/css" href="/Content/2010.2.825/telerik.common.min.css" rel="stylesheet"/>
<link type="text/css" href="/Content/telerik.gmctelerik.css" rel="stylesheet"/>
<link type="text/css" href="/Content/jqModal.css" rel="stylesheet"/>
</head>
  
<body>
    <div>
          
    <div id="publicpage">
        <div id="publicheader">
            <img src="../../Content/Images/GMCPublicHeader.png" style="height:104px;width:843px;" />
        </div>
        <div style="float:left">
            <a href="/en-us/Home/showContentPage?theAction=contact">[English]</a>
            <a href="/pt-br/Home/showContentPage?theAction=contact">Portuguese</a>
        </div>
        <div class="gmcmenu" style="float:right">
        <ul class="t-widget t-reset t-header t-menu" id="HomeMenu"><li class="t-item t-state-default"><a class="t-link" href="/en-US/Home/home?theAction=home">Home</a></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/Home/showContentPage?theAction=about">About Us<span class="t-icon t-arrow-down"></span></a><ul class="t-group"><li class="t-item t-state-default"><a class="t-link" href="/en-US/SubContent/showSubContentPage?subAction=about_overview">Corporate Overview</a></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/SubContent/showSubContentPage?subAction=about_management">Management Team</a></li></ul></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/Home/showContentPage?theAction=technology">Technology<span class="t-icon t-arrow-down"></span></a><ul class="t-group"><li class="t-item t-state-default"><a class="t-link" href="/en-US/SubContent/showSubContentPage?subAction=tech_billing">Proprietary Billing Systems</a></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/SubContent/showSubContentPage?subAction=tech_processing">Automated Customer Processing</a></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/SubContent/showSubContentPage?subAction=tech_freight_payables">Freight Payables Automation</a></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/SubContent/showSubContentPage?subAction=tech_development">Development Capabilities</a></li></ul></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/Home/showContentPage?theAction=services">Services<span class="t-icon t-arrow-down"></span></a><ul class="t-group"><li class="t-item t-state-default"><a class="t-link" href="/en-US/SubContent/showSubContentPage?subAction=services_rfpmgmt">RFP Management</a></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/SubContent/showSubContentPage?subAction=services_optimization">Network Optimization</a></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/SubContent/showSubContentPage?subAction=services_invmgmt">Invoice Management</a></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/SubContent/showSubContentPage?subAction=services_visibility">Spend Visibility</a></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/SubContent/showSubContentPage?subAction=services_analytics">Spend Analytics</a></li></ul></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/Home/showContentPage?theAction=roi">ROI<span class="t-icon t-arrow-down"></span></a><ul class="t-group"><li class="t-item t-state-default"><a class="t-link" href="/en-US/SubContent/roiCaseStudy/1">Client Case Study 1</a></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/SubContent/roiCaseStudy/2">Client Case Study 2</a></li></ul></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/Home/showContentPage?theAction=contact">Contact Us</a></li><li class="t-item t-state-default"><a class="t-link" href="/en-US/Account/LogOn?theAction=login">Log In</a></li></ul>
        </div>
          
    <form action="/en-US/Home/showContentPage?theAction=contact" method="post">
    <div id="publiccontent">
          
<div id="publicmaincontent" class="maincontentclass"
     style="background-image:url(../../content/images/Contactusphone.png); background-repeat:no-repeat;">
    <div id="maincontentright">
        <p class="publiccontentheader">CONTACT US</p>
        <p class="publiccontenttext"><p class="contactusclass1">Corporate Offices</p><br/><p class="contactusclass2">7240 Goodlett Farms Parkway<br/>Suite 110<br/>Memphis, TN  38016<br/><br/>1-877-397-2834 Tel.<br/><br/>901-507-9329 Fax<br/></p><p class="contactusclass2">Contact <u><a href="mailto:custserv@gmcps.com" style="font-size:1em; color:#719501;">Customer Service</a></u></p><br/><p class="contactusclass2">Contact your area <u><a href="#" class="jqModal">sales representative</a></u></p></p>
           
        <a href="#" id="popup">Open Telerik Window</a>
        <span id="salespopup" class="windows7">
            <div class="t-widget t-window" id="Window" style="display:none"><div class="t-window-titlebar t-header"> <span class="t-window-title">Find Your Sales Representative</span><div class="t-window-actions t-header"><a class="t-window-action t-link" href="#"><span class="t-icon t-refresh">Refresh</span></a><a class="t-window-action t-link" href="#"><span class="t-icon t-maximize">Maximize</span></a><a class="t-window-action t-link" href="#"><span class="t-icon t-close">Close</span></a></div></div><div class="t-window-content t-content" style="overflow:auto;width:450px;height:350px"></div></div>
        </span>
    </div>
</div>
  
    </div>
    </form>
        <div class="footerbuttons">
            <a href="/en-US/SubContent/showSubContentPage?subAction=services_invmgmt"><img alt="Invoice Management" src="/Content/Images/InvoiceManagement.png" /></a>
            <a href="/en-US/SubContent/showSubContentPage?subAction=services_analytics"><img alt="Spend Analytics" src="/Content/Images/SpendAnalytics.png" /></a>
            <a href="/en-US/SubContent/showSubContentPage?subAction=services_visibility"><img alt="Spend Visibility" src="/Content/Images/SpendVisibility.png" /></a>
            <a href="/en-US/SubContent/showSubContentPage?subAction=services_optimization"><img alt="Network Optimization" src="/Content/Images/NetworkOptimization.png" /></a>
            <a href="/en-US/SubContent/showSubContentPage?subAction=services_rfpmgmt"><img alt="RFP Management" src="/Content/Images/RFPManagementpng.png" /></a>
        </div>
        <div id="footer">
            Copyright 2010 Green Mountain Consulting, All Rights Reserved    
            <img alt="mountains" src="/Content/Images/ClassicSiteIcon.png" style="float:none"/>    
            <a class="greenlink" href="https://www.greenmountainconsulting.com/gmcweb/help/PRIVACY_NOTICE.htm">Privacy Policy</a>
        </div>
    </div>
  
    </div>
    <script type="text/javascript" src="/Scripts/2010.2.825/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/Scripts/2010.2.825/telerik.common.min.js"></script>
<script type="text/javascript" src="/Scripts/2010.2.825/telerik.menu.min.js"></script>
<script type="text/javascript" src="/Scripts/2010.2.825/telerik.draganddrop.min.js"></script>
<script type="text/javascript" src="/Scripts/2010.2.825/telerik.window.min.js"></script>
<script type="text/javascript" src="/Scripts/2010.2.825/telerik.combobox.min.js"></script>
<script type="text/javascript">
//<![CDATA[
jQuery(document).ready(function(){
jQuery('#HomeMenu').tMenu();
jQuery('#Window').tWindow({modal:false, contentUrl:'/en-US/Home/salesRepresentatives', draggable:true, resizable:true});$('#popup').bind('click', function openWindow(e){ $('#Window').data('tWindow').open();})});
//]]>
</script>
</body>
</html>

3 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 29 Aug 2010, 08:34 AM
Hi Donna Stewart,

I suppose that the error is caused of missing telerik.list.js file. Try to include it and let us know what your findings are.

Kind regards,
Georgi Krustev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Donna Stewart
Top achievements
Rank 1
answered on 30 Aug 2010, 03:34 PM
Yes that worked!  Thank you very much.  I had included telerik.dropdownlist.min.js when I was on the previous version, but got an error when I upgraded via the Telerik menu in VS 2010 (which is nice btw).  When I looked at the help doc that is included in the Telerik download, it still had telerik.dropdownlist.min.js listed as necessary.  Thank you again for your help!
0
nefis
Top achievements
Rank 1
answered on 01 Apr 2011, 08:21 PM
Hello,
i'm seeing similar issue: IE8-9 throws an error while FF shows just first item and doesn't a drop down part.
telerik.list.js is loaded indeed and the list is populated with 19 items.
ADDED: it has something to do with jQuery UI tabs. If the dropdown in such tab, I see the issue. If it's directly on a page then no problem.
ADDED: nevermind, it was id/name clash :( my bad
nefis
Tags
General Discussions
Asked by
Donna Stewart
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Donna Stewart
Top achievements
Rank 1
nefis
Top achievements
Rank 1
Share this question
or