cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geert Josten <Geert.Jos...@daidalos.nl>
Subject Re: dynamic cocoon.load("...")
Date Tue, 10 May 2005 10:42:37 GMT
Flowscript is loaded at reading the sitemap file and only reloaded when the js file is changed
(and 
reloading of flowscripts is activated, which is default).

The problem with flowscript functions is that they have to return a 'result'. I am not actually

sure, but I believe a function should end with a cocoon.sendPage("some uri"), to return control
to 
the sitemap. Call the function from the sitemap with:

<map:match pattern="xxx">
   <map:call function="funcname" />
</map:match>

Cheers

WeeZard Saphrane wrote:

> Yes, I'm running this in flowscript, outside of a function (it doesn't even work
> in functions).
> 
> 
> On Mon, 9 May 2005 at 17:29:23, Geert Josten wrote:
> 
> 
>>Are you running the javascript as flowscript? And is the fragment inside or
>>outside a function?
>>
>>Cheers
>>
>>WeeZard wrote:
>>
>>
>>>REPOST
>>>
>>
>>-----------------------------------------------------------------------------
>>------------------ 
>>
>>>I got some test.js javascript file with this in it:
>>>
>>>var x = cocoon.request.get("id");
>>>cocoon.load("foo"+x+".js");
>>>
>>>When i run test.js for the first time, it works fine. Script engine 
>>>reads id
>>>request parameter and loads apropriate foo*.js file.
>>>But when i reload the page with a different id request parameter, script
>>>engine just ignores that, and keeps loading previous foo*.js file.
>>>
>>>For example,
>>>my first request: myPage.html?id=1 loads foo1.js,
>>>my second request: myPage.html?id=2 loads foo1.js, instead of foo2.js !!
>>>
>>>Why this isn't working as it should and is there ANY way to dynamicaly
>>
>>load
>>
>>>external javascript files
>>>
>>>Weez
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>>
>>>
>>
>>-- 
>>=====================================
>>NB: het Daidalos kantoor is sinds 22 april
>>jl. gevestigd op een nieuw adres:
>>
>>Daidalos BV
>>Hoekeindsehof 1 - 4
>>2665 JZ Bleiswijk
>>tel: +31 (0)10 850 12 00
>>fax: +31 (0)10 850 11 99
>>
>>Bovenstaand adres is tevens het postadres.
>>======================
>>Geert.Josten@Daidalos.nl
>>IT-consultant at Daidalos BV
>>
>>http://www.daidalos.nl/
>>
>>GPG: 1024D/12DEBB50
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 
> 
> ____________________
> http://www.email.si/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 

-- 
=====================================
NB: het Daidalos kantoor is sinds 22 april
jl. gevestigd op een nieuw adres:

Daidalos BV
Hoekeindsehof 1 - 4
2665 JZ Bleiswijk
tel: +31 (0)10 850 12 00
fax: +31 (0)10 850 11 99

Bovenstaand adres is tevens het postadres.
======================
Geert.Josten@Daidalos.nl
IT-consultant at Daidalos BV

http://www.daidalos.nl/

GPG: 1024D/12DEBB50

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message