-1

I am executing following code but i am getting error: "Objected Expected" I checked the code but didnt find any problem.

<!DOCTYPE html>
<html>
 <head>
 <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
 <script>
 $(document).ready(function(){
 $("#clickme").click(function(){
 $("#body1").load("http://www.w3schools.com");
 });
 });
 </script>
 </head>
 <body>
 <div id="header">
 <a href="#" id="#clickme">Click me</a>
 hello
 </div>
 <div id="body1">
 mid
 </div>
 <div id="footer">
 hi
 </div>
 </body>
</html>
asked May 20, 2013 at 8:46

2 Answers 2

3

Your id should be

<a href="#" id="clickme">Click me</a>

There was a # in your id.

** EDIT **
Your other problem is that you can't load a page on another domain into your site. You'll have to use an iframe for that.

answered May 20, 2013 at 8:48
Sign up to request clarification or add additional context in comments.

1 Comment

still its not loading. I am using IE8 :(
1

Try removing the hash sign from the id of clickme

<a href="#" id="clickme">Click me</a>
answered May 20, 2013 at 8:49

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.