Results 1 to 4 of 4

Thread: Loading external HTML page for AJAX

  1. #1
    Join Date
    Nov 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Loading external HTML page for AJAX

    Hi,

    I am a new member and am very pleased with what you are doing.

    In particular I was looking at Dynamic Ajax content script where you may load different HTML pages on the right Div container.

    Currently an existing HTML page with proper src for images does not display the images correctly. Also any scripts that is associated with the page does not get displayed.

    Is there a way to display an HTML page, that works fine byitself, to get properly displayed in a dynamic manner using your AJAX code.

    It would be just wonderful for me. If that happens I might want some customized scripts done through you.

    Agaian appreciate your work.

    Ratan Kumar

  2. #2
    Join Date
    Nov 2005
    Location
    the Netherlands
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello,

    I think I have the same problem/question. I have 1 page divided in 2 parts. A left div menu and a right content box. The stylesheets, pages and images are stored in separated maps.

    When I click on the url "ontstaan" (dutch) I expect a html page with a image. I only see the html page without the image. This page is stored in an own directory. See example 1:

    http://www.xs4all.nl/~rkw/indextemp1.html

    It is not a wrong path or something like that. When I test the page without the menu it displays the image correctly. See example 2:

    http://www.xs4all.nl/~rkw/html1/gesc...hiedenis1.html

    I moved the page to the root of the webdirectory, this is working. It displays the same html page with an image (positioned with a stylesheet). See example 3:

    http://www.xs4all.nl/~rkw/indextemp2.html

    Could someone explain why it's not possible to display the image in example 1 how can I resolve this?

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No.
    It is not a wrong path or something like that.
    Actually, it is. The problem is that the browser looks from the images from the point of view of the page containing the script, but the page included by the script is the one with the paths. All you need to do is edit that page to look from the images from the first page's point of view.
    Last edited by Twey; 11-25-2005 at 07:27 PM. Reason: Minor grammar error.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Nov 2005
    Location
    the Netherlands
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Twey, thanks for your helpfull reply. I changed the path on the page including the script and the image, and it is working.

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
  •