You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Loading with AJAX: Including loaded page"s javascript Created Nov 10, 2009

This thread is solved

Views: 483     Replies: 1     Last reply Nov 23, 2009  
You must login first before you can use this feature

Tylo

Posts: 22

Registered:
Jul 10, 2009

Loading with AJAX: Including loaded page"s javascript

Posted: Nov 10, 2009

I had a hard time defining the title of my problem, but it's a relatively simple question.

When I load a page through AJAX, I want its javascript to come with it.

So if I wanted to load ext_page.html, and it had javascript code that worked specifically with elements on that page, I'd like that javascript to work.

As far as I can tell, this does not happen.

How can I get this to work? Is it possible?

degenerate

Posts: 156

Registered:
Sep 19, 2008

» Loading with AJAX: Including loaded page"s javascript

Posted: Nov 23, 2009

Reply to: Loading with AJAX: Including loaded page"s javascript, from tylo
You can most likely solve your problem with $.getScript.

It will allow you to load additional JS files using the jQuery library. What I am unsure is, if you use this function in multiple overlays on the same page... will it reload the JS every time or cause problems? I have no idea!