I’d suggest you use Firebug with Firefox if you are not already. It would tell 
you why your JS doesn’t work in the second case you describe below where you 
embed the JS into HTML.

When accessing the page directly (not inside a modal dialog), does your JS work 
OK?

Muzaffer

From: Jacob Wills [mailto:[email protected]]
Sent: Thursday, April 02, 2009 11:17 AM
To: [email protected]
Subject: AJAX and Javascript with JQuery

Hi,

I'm having problems getting javascript to run properly on pages I load with 
JQuery's .load() function. I have a modal window that I want to populate with a 
Click page, so I use .load() to grab its template .htm file and then Click's 
automapping runs the associated Java class.

The problem is, any controls on the page that use javascript (like 
Click-Calendar's CalendarField) don't work, since the external .JS files aren't 
being passed in along with everything else. The CSS transfers just fine, but 
$jsImports is always empty and when I tried to make use of getHtmlImports() I 
found that it isn't even being called during the process. Even if I try to hack 
around things and include the .JS files in the container's page, the controls 
within the AJAX'ed page still won't work.

Is there a way to make this work, or am I going about this the wrong way? Would 
ClickClick's JQuery controls make things any simpler?

Thanks,

--Jacob Wills

Reply via email to