1

This is not loading page where is the error ? ,this is using jquery version 1.9.1 ,the page http://localhost/ReportsSec/MapNavigation.aspx contains google maps api the error given below:

Refresh the page to see messages that may have occurred before the F12 tools were opened. SCRIPT5009: 'google' is undefined Default.aspx, line 116 character 1 SCRIPT257: Could not complete the operation due to error 80020101. jquery-1.9.1.js, line 602 character 4

 <!DOCTYPE html>
        <html>
    <head>
    <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>

    <script>
        $(document).ready(function () {
            $("button").click(function () {
                $("#div1").load("http://localhost/ReportsSec/MapNavigation.aspx");
            });
        });
    </script>
    </head>
    <body>

    <div id="div1" style="width:450px;height:450px"></div>
    <button>Get External Content</button>

    </body>
    </html>
user2153650
  • 45
  • 2
  • 8
  • 2
    What browser are you using? Use the browser developer tools to see what is happening. For example in the console you can see possbile Javascript errors. – Esailija Mar 21 '13 at 16:49
  • ie 9, kindly note i m trying to load .aspx page, no error in console – user2153650 Mar 21 '13 at 16:51
  • does any other method work? – btevfik Mar 21 '13 at 16:51
  • Kindly verify the name and path of you aspx page. –  Mar 21 '13 at 16:51
  • everything is perfect outside of the code i can run this url – user2153650 Mar 21 '13 at 16:52
  • @user2153650 IE has the worst developer tools :P Anyway, you need to go to script tab in the developer tools and press Start debugging button. If everything is still fine, then you can go to Network tab, press Start capturing and view the details of your ajax request. – Esailija Mar 21 '13 at 16:53
  • i have IE9 developer tools no error in console. – user2153650 Mar 21 '13 at 16:55
  • Go to script tabs of you IE developer tool and see if jquery library "jquery-1.9.1.min.js" is appearing in the dropdown. –  Mar 21 '13 at 16:56

2 Answers2

1

I think the problem is probably that you need an ajax mod in order to load external pages with jquery .load(). Try this : Cross-domain requests with JQuery

Then you can do something like: $('html').load('http://google.com');

mario.tco
  • 674
  • 1
  • 7
  • 19
  • it gives error in console,,,,,,,Refresh the page to see messages that may have occurred before the F12 tools were opened. SCRIPT5009: 'google' is undefined Default.aspx, line 116 character 1 SCRIPT257: Could not complete the operation due to error 80020101. jquery-1.9.1.js, line 602 character 4 – user2153650 Mar 21 '13 at 17:18
  • Great =)! Good luck with your project ^_^ – mario.tco Mar 21 '13 at 17:22
0

I think this is the problem of your imported js file.Try this once

<script src="http://code.jquery.com/jquery-1.9.1.js"></script>


     $(document).ready(function () {

            $("#div1").load("http://localhost/ReportsSec/MapNavigation.aspx");

    });
PSR
  • 39,804
  • 41
  • 111
  • 151
  • you have answered and then asking questions to OP without any clarification. –  Mar 21 '13 at 16:52
  • i am sure this is the problem. – PSR Mar 21 '13 at 16:53
  • because people can be dicks. regardless, you can't KNOW that this is the problem because he may very well have his path correctly because he has jquery on his server in the js folder. it's not possible to know that this is the problem, though I would bet that you're probably right and this is the problem. – iAmClownShoe Mar 21 '13 at 16:55
  • can you just clarify can this load method, also loads .aspx page – user2153650 Mar 21 '13 at 16:55
  • @user2153650 see the question what he asked load in not working – PSR Mar 21 '13 at 16:56
  • @PSR CAN YOU JUST REPLY LOAD METHOD CAN WORK ON .ASPX PAGE OR NOT? – user2153650 Mar 21 '13 at 16:59
  • @user2153650 try the code what i posted now.Then it will load – PSR Mar 21 '13 at 17:01
  • @user2153650 yes i believe that you can. the only real restriction being that you cannot have nested forms in this fashion. – iAmClownShoe Mar 21 '13 at 17:01
  • SCRIPT257: Could not complete the operation due to error 80020101. jquery-1.9.1.js, line 602 character 4 – user2153650 Mar 21 '13 at 17:01
  • IF YOU ARE NOT ABLE TO ANSWER , JUST IGNORE DONT TRY TO COMMENT – user2153650 Mar 21 '13 at 17:05
  • kindly refer this link http://stackoverflow.com/questions/4918969/ajax-request-problem-error-80020101/10275316#10275316 –  Mar 21 '13 at 17:06
  • why you are saying like that – PSR Mar 21 '13 at 17:06
  • @user2153650 After finding the answer only you know that is the answer.Before you also dont know – PSR Mar 21 '13 at 17:07
  • @PSR i m trying to load the page,"http://localhost/ReportsSec/MapNavigation.aspx" which contains google maps api ther fore i think this is the errorSCRIPT5009: 'google' is undefined Default.aspx, line 116 character 1 SCRIPT257: Could not complete the operation due to error 80020101. jquery-1.9.1.js, line 602 character 4 – user2153650 Mar 21 '13 at 17:11