|
-
Apr 9th, 2010, 06:34 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Error:Microsoft JScript runtime error: Object expected in jquery
Code:
<html>
<head>
<title>JQuery Hello World</title>
<script type="text/javascript" src="jquery-1.2.6.min.js"></script>
</head>
<script type="text/javascript">
$(document).ready(function(){
$("#msgid1").html("This is Hello World by JQuery 1");
});
</script>
<body>
This is Hello World by HTML
<div id="msgid1">
</div>
</body>
</html>
it gives me an exception as i mentioned in title with three buttons(ignore,break,Continue)
although i have added file (.js file in my solution tree).what else coudl be the reason behind this
There is no achievement without goals
-
Apr 9th, 2010, 10:47 AM
#2
Re: Error:Microsoft JScript runtime error: Object expected in jquery
There is nothing wrong with your code. Try replacing this:
Code:
<script type="text/javascript" src="jquery-1.2.6.min.js"></script>
with this:
Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
All this does is replace the reference to your local .js file, with a reference to the same file hosted by Google. If it works, then your code is simply not referencing your local .js file correctly.
-
Jun 21st, 2012, 07:36 AM
#3
New Member
Re: [RESOLVED] Error:Microsoft JScript runtime error: Object expected in jquery
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|