[thelist] Question about ajax loaded pages, and the parent javascripts...

Will willthemoor at gmail.com
Sat Oct 31 13:51:57 CDT 2009

I didn't actually look at the script so I could be off here... that
script likely scans the DOM when it's loaded and attaches its magic at
that point. When you load something in via AJAX, it doesn't know that
it's there because it only does its attaching once: when the dom is
loaded.  When you load something into the dom with ajax, reinitialize
your photo script after it's loaded, preferably via some sort of
callback. all should work again.


On Fri, Oct 30, 2009 at 7:38 AM, Tris <beertastic at gmail.com> wrote:
> I'm creating an ajax heavy site.
> I've got a main page layout with lots of divs
> header
> menu
> mainbody
> footer
> etc etc...
> Within the body, I'm listing search results, and each each result is a
> loaded instance of another file.
> I want to use this for each search result:
> http://www.netzgesta.de/instant/
> I've included the script file in the MAin layout structure as loading
> each time in the picture div is too slow.
> The reason I'm loading the pic in a seperate div/page is cause
> eventually, I will use multiple images down the line..
> My div heirachry is this:
> mainbody DIV
>> main area container DIV
>>> search result DIV
>>>> image DIV
> each div loads it's own php page.
> anyhoo...
> basically, the class I'm asigning to the image in the final div, does
> not pick up the javascript inclided in the main page layout.
> Anyone know why that might be?
> Peace and love..
> Tris...
> --
> ==========================
> "The only people who don't make mistakes are those who don't do anything"
> Give a man a fish and he'll feed himself for a day.
> Give a man a religion and he'll starve to death praying for a fish.
> Anon
> `We are what we pretend to be, so we must be careful what we pretend to be.`
> Kurt Vonnegut
> `When a person can no longer laugh at himself, it is time for others
> to laugh at him.`
> Thomas Szasz
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !

More information about the thelist mailing list