Importing Javascript with Ajax

thread: 2 messages  |  last: about 2 years ago  |  started: monday, january 4, 2010, 8:17 am pst


#1  |  Leonardo (Minas Gerais) Brazil
Monday, January 4, 2010, 8:17 AM PST

The qcodo has support to import a javascript library for a request in ajax.

If there is how?

But I see that in ajax requests is called the method renderBegin, only renderEnd.

#2  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Monday, January 4, 2010, 8:43 AM PST

It does... in any control, you can specify any/all included javascripts you want to use.

When that control gets rendered, it will automagically include (and dynamically load, if needed) the javascript that you want to have.

See line 4 of something like QDialogBox.class.php:

protected $strJavaScripts = '_core/control_dialog.js';

When the dialogbox gets rendered for the first time on the page, it will ensure that control_dialog.js is loaded onto the page.

Note that the path is relative to the JS_ASSETS directory as defined in your configuration.inc.php file.



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.