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>
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. Commented Mar 21, 2013 at 16:49
  • ie 9, kindly note i m trying to load .aspx page, no error in console Commented Mar 21, 2013 at 16:51
  • does any other method work? Commented Mar 21, 2013 at 16:51
  • Kindly verify the name and path of you aspx page. Commented Mar 21, 2013 at 16:51
  • everything is perfect outside of the code i can run this url Commented Mar 21, 2013 at 16:52

2 Answers 2

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');

Sign up to request clarification or add additional context in comments.

2 Comments

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
Great =)! Good luck with your project ^_^
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");

    });

14 Comments

you have answered and then asking questions to OP without any clarification.
i am sure this is the problem.
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.
can you just clarify can this load method, also loads .aspx page
@user2153650 see the question what he asked load in not working
|

Your Answer

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.