JQuery - Microsoft JScript runtime error: Object expected

Posted by ydobonmai on Stack Overflow See other posts from Stack Overflow or by ydobonmai
Published on 2010-07-01T13:27:41Z Indexed on 2012/06/06 10:40 UTC
Read the original article Hit count: 198

Filed under:

Below is the content of my .aspx page and the "jquery-ui-1.7.1.custom.min.js" is in the same location as the .aspx file. When I run the website with debugging, I get the below error. I know I am terribly missing something here. Any clue?

Error :-

Microsoft JScript runtime error: Object expected

When I run without debugging, I get the following javascript error:-

Line: 10
Error: 'jQuery' is undefined

ASPX page content:-

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>

<!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></title>
    <script src="jquery-ui-1.7.1.custom.min.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <script>$(function () { alert('hello') });</script> 

    </div>
    </form>
</body>
</html>

© Stack Overflow or respective owner

Related posts about jQuery