View Full Version : Loading external HTML page for AJAX

11-24-2005, 04:25 PM

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

11-25-2005, 06:26 PM

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:


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:


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:


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

11-25-2005, 06:40 PM

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.

11-25-2005, 07:16 PM
Twey, thanks for your helpfull reply. I changed the path on the page including the script and the image, and it is working. :)