[PHPTAL] PHPTAL + xajax
Anniyka Wandersmann
anniyka at wandersmann.net
Mon Oct 30 11:52:21 CET 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, 30 Oct 2006, Anniyka Wandersmann wrote:
> --[PinePGP]--------------------------------------------------[begin]--
>
> Is someone here who is running PHPTAL together with xajax?
>
> I wonder how to get the javascriptcode into a variable and to give it over
> to PHPTAL with tal:content. Till now, all I get from getJavascript or
> printJavascript is an array but no code.
>
Ok, I got further now ...
Till now this is what I do have in my template
<script name="test" type="text/javascript" tal:content="structure ajax">
foo
</script>
Well, this is, what I get:
<script name="test" type="text/javascript"> <script
type="text/javascript"><!--
var xajaxConfig = {
requestURI: "http://www.wandersmann.net/test/",
debug: false,
statusMessages: false,
waitCursor: true,
version: "xajax 0.5 Beta 1",
legacy: false
};
var xajaxLoaded=false;
function xajax_helloWorld(){return xajax.call("helloWorld", {parameters:
arguments});}
--></script>
<script type="text/javascript" src="xajax/xajax_js/xajax.js"></script>
<script type="text/javascript"><!--
window.setTimeout(function () { if (!xajaxLoaded) { alert('Error: the
xajax Javascript file could not be included. Perhaps the URL is
incorrect?\nURL: xajax/xajax_js/xajax.js'); } }, 6000);
--></script>
</script>
Well, as you can see at the "name" attribute that I added for testing, I
will have to much <script>-tags. I tried to remove them befor I noticed,
that there are more of them.
Is there an nice way to do this with PHPTAL? As of the documantation of
xajax I HAVE TO put this in the header which I certainly belive after
looking at the code, so I do not may use something like a div-container
around it.
A TAL attribute would be nice, that also removes itself entirely. I didn'
find something like this till now.
thanks,
anniyka
- --
\ Anniyka Wandersmann :: Technische Leiterin
\ Parkstr. 20 :: Phone: +49-911-25569449
\ 90409 Nuremberg :: Mobile: +49-163-8766206
\ Germany :: Fax: +49-911-8173374
\ /\ http://www.wandersmann.net :: email: info at wandersmann.net
\ / \ ____________________________________________________________
\/ \/ A N D E R S M A N N . N E T :: wir gehen fuer sie ...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFFRdlt0UZdMosWNssRAknsAJ9gay+r2Efg3YtFYiKldKSqtm+TSwCgnvVH
lk3YFnMUGdQ86YLxIUPP2Mg=
=x6CB
-----END PGP SIGNATURE-----
More information about the PHPTAL
mailing list