If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Flaw in Dynamic Ajax display script causing slideshow to break

Hi all.

I'm a little saddened by this because I have created an entire page for a non-profit organization around this script and 2 weeks before I am set to go back to school i find out that a main feature (a really wicked slide show which cost them 100$ on my recommendation) appears to be incompatible with this script in it's current state.

What occurs is that the slide show works the first time it is visited, however if the user navigates to another link on the page and then decides to re-visit the slide show... it does not function at all. The issue, as it has been described to me by the writers of the slide show, is:

The entire issue is that the paradigm is flawed, since the [Ajax] toggler simply copies the html markup, and does not address any dom-related objects that
may have been instantiated by the scripts on the page that was loaded in,
the [Ajax] toggler must never re-copy. Unlike a frames-based page, or even an iframe, the new page is not under it's own DOM, it is acting on and getting
data from the same original parent page all of the time. This means hat the
DOM and related objects can, and will, become corrupt. Since the [Ajax] toggler
simply copies the raw markup into the div, none of the DOM-related objects
are removed when toggling takes place, so in essence, when the toggler
copies the markup a second time the now new SSM system is attempting to deal
with an already DOM initialized slide show whose parameters are still that
of the previous slide show.

Jay, this technique is an exercise in futility,
it will never work correctly... the toggler can never re-copy an SSM system,
however, since the toggler is working with only one content div, when you
toggle to other content the SSM markup has been removed from the page, but
when re-copied it will not work correctly because the DOM objects from the
previous SSM are still in the pages DOM, causing the new SSM to not work
correctly because it cannot be re-initialized.

The last part of the explanation has me somewhat hopeful.

The script has a built-in function that, for efficiency, checks if the scripts being loaded with the page (via loadobjs()) have already been loaded... and if so does not re-download them. I was hoping that this could be modified to accept a variable (such as 'reload()' ) that would force the ajax script to completely re-initialize / clear & re-download the content being loaded. Would this work?

Have you used FF and Firebug to try to see where the scripts are failing.
Using you steps , FF gives the error

Code:

df has no properties -- p7SSMscripts.js -- line 343

You can produce errors doing other things.
If you navigate to the slideshow and open it, then select Info and look at a sub menus contents, then go back to the slideshow you get various errors. Looks like most of them are in BorderFade.js. You can get a little empty square with the black border, or a thin long vertical border, which may or may not grow to around an image that may or may not be there.
Sometimes the border will grow to the right and extend off screen.
In IE you usually end up with one thumbnail image.