Click here to Skip to main content
16,011,849 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ASP.NET
<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Menu.master" AutoEventWireup="true"
    CodeFile="ObjectRepositoryPages.aspx.cs" Inherits="ObjectRepositoryPages" %>

<%@ MasterType VirtualPath="~/Master/Menu.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<script src="Scripts/jquery.js" type="text/javascript"></script>
<script src="Scripts/colResizable-1.3.min.js" type="text/javascript"></script>
<script src="Scripts/jquery.cookie.js" type="text/javascript"></script>
 <script type="text/javascript">
     $(document).ready(function () {
         if ($.cookie('colWidth') != null) {
             var columns = $.cookie('colWidth').split(',');
             var i = 0;
             $('.GridViewStyle th').each(function () {
                 $(this).width(columns[i++]);
             });
         }

         $(".GridViewStyle").colResizable({
             liveDrag: true,
             gripInnerHtml: "<div class='grip'></div>",
             draggingClass: "dragging",
             onResize: onSampleResized
         });

     });

     var onSampleResized = function (e) {
         var columns = $(e.currentTarget).find("th");
         var msg = "";
         columns.each(function () { msg += $(this).width() + ","; })
         $.cookie("colWidth", msg);
     }; 
</script> 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="overflow: scroll; height: 573px; width: 1030px">
 
        <asp:GridView ID="gvObjectRepository" runat="Server" CssClass="GridViewStyle" AutoGenerateColumns="False"
            CellPadding="1" Visible="true" ForeColor="Black" GridLines="Vertical" DataKeyNames="objectID" BackColor="White"
            Height="110px" Style="margin-right: 0px" ShowFooter="false" Width="990px" 
            OnRowDataBound="gvObjectRepository_RowDataBound" AutoGenerateEditButton="True"
            OnRowEditing="gvObjectRepository_RowEditing" OnRowCancelingEdit="gvObjectRepository_RowCancelingEdit"
            OnRowUpdating="gvObjectRepository_RowUpdating">



when i run the project I am getting a error "Microsoft JScript runtime error: Object doesn't support this property or method"
Posted
Comments
E.F. Nijboer 2-Dec-13 6:09am    
Which line? What property? Have you pressed f12 in the browser to check it out using the debugger?
ShaHam11 2-Dec-13 7:25am    
Thank you for help.I am unable to debug the jquery file.. it does not show any particular line this is the excat message I get "Microsoft JScript runtime error: Object doesn't support this property or method" and VS points to jquery.js
E.F. Nijboer 2-Dec-13 7:59am    
In case everything else fails you can always place some alerts in between to narrow down your search. It probably is some call to jquery (or plugin) that doesn't exists.
ShaHam11 2-Dec-13 23:48pm    
Hi, I found the problem I am using jquery file in some other page as well hence when my webproject loads i get the above error. However if i comment in the other page it loads without any problem. But again I cannot be commenting on the other page. I need to work on the other page as wel. Any suggestions
ShaHam11 2-Dec-13 23:52pm    
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Menu.master.cs" Inherits="Master_Menu" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Universal Test Automation Framework</title>
<asp:ContentPlaceHolder ID="head" runat="server">

<link href="../Script/MainWindow.css" rel="stylesheet" type="text/css" />
<%-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>--%>
<script type="text/javascript">
$(document).ready(function () {
try {

$("#buttomLeftSide").bind("contextmenu", function (e) {
e.preventDefault();
$("#custom-menu").css({ top: e.pageY + "px", left: e.pageX + "px" }).show(100);
});
$(document).mouseup(function (e) {
var container = $("#custom-menu");
if (container.has(e.target).length == 0) {
container.hide();
}
});
}
catch (err) {
alert(err);
}
});
</script>

If I comment the Javascript in the above lines of code it works fine

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900