[CLOSED] Error loading page using Javascript

  1. #1

    [CLOSED] Error loading page using Javascript

    Hi,

    I am attaching the error that I am getting loading a page using Javascript.

    
    
    
    <script type="text/javascript">
    
    
    var loadPage = function()
    
    
    {
    
    
    PanelContent.load('./ManagePortal.aspx');
    
    
    }
    
    
    </script>
  2. #2

    RE: [CLOSED] Error loading page using Javascript

    Hi,

    You have to use iframe mode
    <script type="text/javascript">
        var loadPage = function () {
            PanelContent.load({ url : "../ManagePortal.aspx"), mode : "iframe" });
        };
    </script>
  3. #3

    RE: [CLOSED] Error loading page using Javascript

    Hi,

    It shows the message "Loading..", but the page is not loaded.

    I am sure that the url (".\ManagePortal.aspx")) is right because I used the same url to load the same page by code behind and it works fine.

    Could you please tell me please else do I have to do to make it work in javascript?

    
    
    
    // This is the code that you suggested me to use.
    
    <script type="text/javascript">
    
    
    var loadPage = function()
    
    
    {
    
    
    PanelContent.load('{ url : ".\ManagePortal.aspx"), mode : "iframe" }');
    
    
    }
    
    
    </script>
  4. #4

    RE: [CLOSED] Error loading page using Javascript

    Hi,

    Please see once again my code from previous post. It is required to pass object to the load method (I am not sure why did you wrap that object by quotes) . Also please ensure that you use correct url, may be you have to use '../ManagePortal.aspx'
  5. #5

    RE: [CLOSED] Error loading page using Javascript

    I got a message with the error: "Microsoft JScript runtime error: Object expected" using the code that you suggested me.


    
    
    
    
    <script type="text/javascript">
    
    
    var loadPage = function(pageName)
    
    
    {
    
    
    PanelContent.load({ url : "http://localhost/ChampWeb/ManagePortal.aspx"), mode : "iframe" });
    
    
    }
    
    
    </script>
  6. #6

    RE: [CLOSED] Error loading page using Javascript

    Hi,

    Remove the parenthesis after url

Similar Threads

  1. Replies: 5
    Last Post: Oct 23, 2012, 2:19 PM
  2. Replies: 7
    Last Post: Jul 31, 2012, 8:31 PM
  3. [CLOSED] loading page layer using javascript
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 28, 2011, 5:14 AM
  4. [CLOSED] JavaScript error in IE after loading MultiSelect from Popup
    By jthompson in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Apr 26, 2011, 12:52 PM
  5. [CLOSED] Javascript Error loading dynamic usercontrol 1.0
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 01, 2010, 3:05 AM

Posting Permissions