You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by David Merrilees <da...@fenc.org.uk> on 2004/11/30 10:42:49 UTC

retrieving a cookie value in flowscript

I'm having trouble retrieving a cookie value in flowscript. I have a
cookie set with the value 'true'. When I retrieve the value using
flowscript I receive the error:

true is not a function.

org.apache.avalon.framework.CascadingRuntimeException: true is not a
function.


My flowscript:

function contact() {
	var test = cocoon.request.getCookies()[0].value()
		cocoon.sendPage( "test.jx", { "test" : test } );
}

Any ideas?

David Merrilees


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


Re: retrieving a cookie value in flowscript

Posted by Andrew M <an...@jibeya.com>.
try adding .toString() at the end.... not sure, but that might so the 
trick.

Andrew
On 30 Nov 2004, at 09:42, David Merrilees wrote:

> I'm having trouble retrieving a cookie value in flowscript. I have a
> cookie set with the value 'true'. When I retrieve the value using
> flowscript I receive the error:
>
> true is not a function.
>
> org.apache.avalon.framework.CascadingRuntimeException: true is not a
> function.
>
>
> My flowscript:
>
> function contact() {
> 	var test = cocoon.request.getCookies()[0].value()
> 		cocoon.sendPage( "test.jx", { "test" : test } );
> }
>
> Any ideas?
>
> David Merrilees
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>