Results 1 to 6 of 6

Thread: Do images work with Rotating Includes Script?

  1. #1
    Join Date
    Sep 2010
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Do images work with Rotating Includes Script?

    1) Script Title: Ajax Rotating Includes Script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...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

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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
    DD Admin

  3. #3
    Join Date
    Sep 2010
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  4. #4
    Join Date
    Sep 2010
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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 for example:

    Code:
    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:

    Code:
    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, 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.
    DD Admin

  6. #6
    Join Date
    Sep 2010
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks DD. That was it. So obviously obvious now.
    The working page: http://yourphis.com/index_new.html

    You're the BEST!
    M

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
  •