PDA

View Full Version : Do images work with Rotating Includes Script?



micheleK
09-13-2010, 03:33 PM
1) Script Title: Ajax Rotating Includes Script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxrotate.htm

3) Describe problem:
I've searched the forums and haven't been able to find an answer, which is why I'm posting my problem.

I've used this script in the past with great success but my includes have always been text based. I'm trying it on a new site and it's not working. After checking my HTML, I'm wondering if this script doesn't support images. It seems like it should, but my linked include files only contain an image.

Here is my hidden link: http://yourphis.com/index_new.html

Thanks to anyone who can help!
michele

ddadmin
09-14-2010, 04:44 AM
Looking at the files you're displaying using the script, it seems the image within the files are broken themselves, for example: http://yourphis.com/_images/file.html

micheleK
09-14-2010, 03:34 PM
Thanks for pointing that out, I was testing out absolute URLs with that file and it was incorrect. I fixed it and it still isn't working. The rest of the files were correct, but I was using relative links to the image. When you view them directly they are working:
http://yourphis.com/_images/file3.html

This is what the page should look like (note: this link doesn't include the rotating script): http://www.kruegelisms.com/freelance/PHIS/

Other that these files pointing to images, the only other difference is that I've built the hidden page on my client's site (http://yourphis.com/index_new.html) using Dreamweaver templates. If images should work properly with this script, would the fact that I put it together in Dreamweaver the problem?

Or, might there be some change to the script that I've failed to make?

I've also used absolute positioning for the containing div and z-index:
#homepage_house {
position:absolute;top:0;left:0;
z-index:-1;
}

Thanks again DD Admin, any more input at all is highly appreciated!
michele

micheleK
09-14-2010, 08:29 PM
I'm trying to troubleshoot this, so any help would be great. I've added some text to my included files (file 1, file2.... etc). The text now shows up, but the image still isn't there. This is what makes me believe that it's an image thing. If you link to the included files directly the image shows up, so i don't have the wrong URL.

You can see my new test here:
http://kruegelisms.com/freelance/PHIS/index_test.html

ddadmin
09-15-2010, 04:49 AM
The paths to the external .htm files are now correct, though you also need to make sure the reference to each image inside each of these files are absolute. Take the contents of file2.html (http://kruegelisms.com/freelance/PHIS/_images/file2.html) for example:


file 2
<img src="image_homepage2.jpg" width="950" height="585" alt="Image Homepage2" />

You should change the above image reference so it's absolute:


file 2
<img src="http://kruegelisms.com/freelance/PHIS/_images/image_homepage2.jpg" width="950" height="585" alt="Image Homepage2" />

The reason for this is that when the external .htm file gets added to your main page, all image paths become relative to the later directory, so the image appears broken once again. Right now if you look closely at the top of your index page (http://kruegelisms.com/freelance/PHIS/index_test.html), you'll see that it is in fact including the contents of the external file, with the text "file 2" appearing, then a broken image, which in Firefox is invisible.

micheleK
09-15-2010, 06:55 PM
Thanks DD. That was it. So obviously obvious now.
The working page: http://yourphis.com/index_new.html

You're the BEST!
M