Results 1 to 6 of 6

Thread: Using Image Conveyor in external ajax pages

  1. #1
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Using Image Conveyor in external ajax pages

    Script Title: Conveyor Belt Slideshow
    Original URL: http://www.dynamicdrive.com/dynamici...rightslide.htm

    Modified Code: Was modified for dynamic resize, see attached.

    Problem: When using ajax to load another html page where this JS file gets called nothing shows up. Works when directly opening the external page, just not when the external page is embeded. Also tried putting the code directly into the html of the external page, same results. Conveyor works on main page if it is not loaded dynamically with the ajax scripts. You may also want to take a look at http://www.dynamicdrive.com/dynamici...jaxcontent.htm
    for the ajax scripts being used. Can anyone point me in the right direction?

    Thanks

  2. #2
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Update

    I've tried a fresh copy of the conveyor script in an external page loaded by the ajax script, and all I get then is a blank grey box in the upper left corner of the window, roughly the size of the intended conveyor. No images load, and there isn't even the blank/broken image graphic. Any Help?

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The easiest method is to have the external page with the script on it in an iframe and have Ajax load the page with that iframe.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Actually I thought of that, but when I tried that I cannot then load something in the other ajax divs by clicking on something in the iframe. Of course I'm not sure if I messed something up there or not.
    I've continued testing the conveyor script and it seems like it bombs out because of the document.write command. Is there any way to do inline insertion without document.write? I did find this: http://www.sitepoint.com/blogs/2007/...documentwrite/
    but I'll admit, that is a bit over my head.

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    when I tried that I cannot then load something in the other ajax divs by clicking on something in the iframe
    Why not? You would have to use the 'parent.' prefix when calling a function from the top page. Like if you were used to having:

    Code:
    dothis('item2');
    Since it is now in an iframe, you need to have:

    Code:
    parent.dothis('item2');
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Doh!

    Yep I forgot the "parent" in the javascript... Thanks, I appreciate the help.

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
  •