MagicMagnify Plus: JS errors when re-run after AJAX page load.
I want to use Magic magnify on a page where part of it is loaded via AJAX calls (the image being one of the parts). I re-run the MagicMagnify_findMagnifiers() function which makes the functionality work, but I get a Dom-based JS error (something to do with the Magic Thumbs that are created when run).
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
The best answer from the company
-
This problem has now been fixed. For the record:
1. We made some modifications to Magic Magnify.
2. Then in the HTML page, we initiated MagicMagnify_stopMagnifiers(); before changing the content initiated MagicMagnify_findMagnifiers(); afterwards. We did this instead of MagicThumb.stop(); and MagicThumb.refresh(); respectively.
Magic Toolbox
I’m happy we fixed this
The company says
this answers the question
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Hi Garry,
That's because the page is still loading. If your page has lots of content - HTML, images, SWF, other JS, then it takes longer before Magic Magnify is ready for use.
If you send us a link to your page, we will look at what you can to do improve the page load. http://www.magictoolbox.com/contact/
Thanks,
Magic Toolbox
I’m happy
-
Inappropriate?Hi there,
It's not a loading time issue: there isn't much data loading and I've even tried putting a large delay on the call MagicMagnify_findMagnifiers().
The script from what I can see, is intended to only run once and has incrementors and creates DIV elements for the thumb zoom etc...
When it is RUN again, all of that stuff re-occurs.
I get zero js errors when I comment out the
"MagicThumb.thumbs.push(new (MagicThumb.Item)(divElmThumb.firstChild, groupId, thumbIndex, "
... code but obviously I get no Pop-up zoomed image.
To clarify, additional objects are created and pushed into "MagicThumb.thumbs" every time the MagicMagnify_findMagnifiers() method is called.
Ideally, if there was a method to destroy and/or reinitialize the whole object, it would start over and probably not have issues.
I did provide a basic example of this issue to the support contact, for your edification : http://www.purecommerce.net/item/Niko...
This particular example has a 500ms delay before MagicMagnify_findMagnifiers() is called after the inner page content is ajax'd in.
-
Inappropriate?To clarify the previous, particular link: the AJAXing only occurs after a Variety selection is made: e.g. choose a different option from the select box or click on a radio.
-
Inappropriate?Hi Garry,
To confirm, we'll continue to talk on email. When the problem is solved, we will post it here.
Magic Toolbox
I’m happy
-
Inappropriate?This problem has now been fixed. For the record:
1. We made some modifications to Magic Magnify.
2. Then in the HTML page, we initiated MagicMagnify_stopMagnifiers(); before changing the content initiated MagicMagnify_findMagnifiers(); afterwards. We did this instead of MagicThumb.stop(); and MagicThumb.refresh(); respectively.
Magic Toolbox
I’m happy we fixed this
The company says
this answers the question
Loading Profile...



EMPLOYEE