Now getJavascript method returns three sequential
scripts to be placed into document's head. It is good
when used in a standalone php script. But it is not so
simple to use these scripts from framework like joomla.
There is $document->addScriptDeclaration method in
joomla, but it wants plain script's text without
starting and ending <script> tags.
I think it would be nice to have something like
getJavascriptArray method in xajax, which would return
array of strings, so it will be possible to add these
scripts to document's head one by one.
Logged In: YES
user_id=762989
Thanks for your request. It does seem like a good idea, so we'll look into it for
the next xajax release.
Logged In: YES
user_id=1556017
Originator: NO
One of the problems with this is that future xajax plugins (and existing ones, for that matter) are able to return script, style and other tags that are accepted within the head of the document. Therefore, it is not necessarily as straightforward as it might first seem.
However, I will look into this further and see if it is possible for a up-coming release.
// Joe