Results 1 to 4 of 4

Thread: Ajax-loading from Step Carousel

  1. #1
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajax-loading from Step Carousel

    1) Script Title: :: Step Carousel Viewer

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...epcarousel.htm

    3) Describe problem: By clicking on a link should be loaded content from other page in a specific div. The content, which is reloaded, includes two carousels. Unfortunately, the carousels are not working, because the setup of stepcarousel not matter anyway. I get the error:
    TypeError: Result of expression 'what' [undefined] is not an object.
    How do I initialize this correct?

    http://www.3design-gmbh.de/ click REFERENZEN -> with reloading, carousels do not work
    http://www.3design-gmbh.de/referenzen/printdesign.html -> without reloading, carousels are working

    Please help me. I'm totally confused ...

    Thanks,
    Enibas

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

    Default

    Ah this isn't an issue with the script, but rather, just a pesky limitation of Ajax. Pages fetched via Ajax should they contain JavaScripts within it in many cases won't run correctly when brought over this way. Ajax basically copies the contents of the external file similar to copying plain text and just dumps it onto the main page. Any runtime scripts on those pages won't be run when they are added to the main page, such as the initialization code of Step Carousel:

    Code:
    stepcarousel.setup({
    	galleryid: 'mygallery', //id of carousel DIV
    	beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
    	panelclass: 'panel', //class of panel DIVs each holding content
    	autostep: {enable:true, moveby:1, pause:3000},
    	panelbehavior: {speed:500, wraparound:false, wrapbehavior:'slide', persist:true},
    	defaultbuttons: {enable: true, moveby: 1, leftnav: ['http://i34.tinypic.com/317e0s5.gif', -5, 80], rightnav: ['http://i38.tinypic.com/33o7di8.gif', -20, 80]},
    	statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
    	contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
    })
    There is no quick fix to this unfortunately.
    DD Admin

  3. #3
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Mh, that's a pity. Is there no workaround for this problem? Perhaps I could load the empty stepcarousel-"frame" with the scripts in an invisible div and make visible only later. Must always be a file (path_to_external_file) in the setup when contenttype=ajax? Or the option can remain empty? Is it possible to change path_to_external_file in the setup later via Javascript?

    Thanks,
    Enibas

  4. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

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
  •