PDA

View Full Version : DHTML Window widget - images query



hugh
05-11-2009, 10:37 AM
Using the DHTML Window widget script - got the basics to work just fine using an ajax call, it opens my new window nicely centred and contains the text of the html page referenced.

However, none of the images of this page are shown, just the browser's broken image link icon?

My page 'hurricane.html' is in a subfolder of my site called '2009', so the ajax call was '2009/hurricane.html'. As I say, all well and it calls the text of that page. All images in the normal html of that page are referenced thus: 'Resources/image.gif' , because that's where my authoring programme stores images, in a folder called Resources.

Well, I've tried taking the images out of the folder and putting them at same level as the html file....I've tried taking the images out and putting them in the windowfiles folder.....I've tried putting a copy Resources folder in the windowfiles folder........but nothing seems to work. :confused:

The script calls my html and displays it just fine - but where are my images?

forum_amnesiac
05-11-2009, 02:40 PM
Can you post a link so that we can see the problem

hugh
05-11-2009, 03:03 PM
No I'm afraid not, am using it on local computer only - just publishing to browser (just testing this at the moment)

ddadmin
05-12-2009, 02:25 AM
When you display a page that's fetched via Ajax, any paths (ie: image paths, .css file paths etc) inside the page must be changed so they are relative to the main page that will be displaying the fetched page, not the original page itself. If both pages are in the same directory then there's nothing to change, but if not, then you have to cater to the former page, not the original page.

What all this basically means is, try changing any paths inside the Ajax page so they are absolute (ie: http://www.mysite.com/images/test.gif instead of images/test.gif).