We have a web app that has a search engine. The search engine allows
an end user to search for books in our system. Below the search
engine we have a DIV with an ID of "searchResults". When a user
searches for results, we use an ajax call and get our results
delivered back to that div. The results are formatted as HTML and
include A links with the correct class names for fancybox to trigger.
Fancybox is set up in the main HTML page that the search form is on.
We have other fancybox link on that main HTML page and they work
perfectly. Our issue is that all of the link that get returned in the
"searchResults" DIV fail to open in a fancy box.
NOW, if i include the javascript code for the fancybox along with the
fancybox.js and the jquery.js with the HTML in to the searchResults
div the fancybox links work perfectly. Problem here is that the
search results are delivered as a person types and javascript crashes
pretty quickly.
So, question is... Is there ANY way that we can keep the javascript on
the main HTML page, but have it load the fancybox links when they
appear in the new HTML in the searchResults DIV as they are loaded via
Ajax?
thanks!
On 22 mrt, 22:15, JFK <jfk.d...@gmail.com> wrote:
> any link?
>
> On Mar 22, 1:49 pm, Matt <mass...@gmail.com> wrote:
>
> > I found one thread discussing this issue, but there was no
> > resolution. I am hoping I can explain the situation a little more
> > clearly and get a resolution.
>
> > We have a web app that has asearchengine. Thesearchengine allows
> > an end user tosearchfor books in our system. Below thesearch
> > engine we have a DIV with an ID of "searchResults". When a user
> > searches for results, we use anajaxcall and get our results
> > delivered back to that div. The results are formatted as HTML and
> > include A links with the correct class names for fancybox to trigger.
>
> > Fancybox is set up in the main HTML page that thesearchform is on.
> > We have other fancybox link on that main HTML page and they work
> > perfectly. Our issue is that all of the link that get returned in the
> > "searchResults" DIV fail to open in a fancy box.
>
> > NOW, if i include the javascript code for the fancybox along with the
> > fancybox.js and the jquery.js with the HTML in to the searchResults
> > div the fancybox links work perfectly. Problem here is that the
> >searchresults are delivered as a person types and javascript crashes