Advanced Search

Results 1 to 2 of 2

Thread: XML file in a IFRAME

  1. #1
    Join Date
    Aug 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy XML file in a IFRAME

    Hi,
    I am using ASP.Net2.0 and I want to display an xml file in an IFRAME. If we open an xml file in the Internet explorer it would display in a proper format. But when I try to set the iframe url to the file location, then it is not displaying anything. Does anyone have any idea why IFRAME is not displaying my xml file in asp.net page.

    I am sending the code that i used.

    var iframe = document.getElementById('xmlFrame');
    var strPath = "C:\\Documents and Settings\\home\\Desktop\\test.xml";
    iframe.src = strPath;

    I tried even the following.
    document.frames[0].location = strPath;
    but is of no use.



    Regards,
    Habeeb.
    Last edited by habeebuddin; 03-12-2008 at 02:07 PM. Reason: for detailed description of problem with code snippet

  2. #2
    Join Date
    Aug 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Got Solution

    Hi,
    I figured out the problem. I placed the xml file in a shared location with full security permissions. And then assigned the shared path location of xml file to the iframe.src.

    Regards,
    Habeeb.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •