[Seaside] onSuccess: problem

Esteban Lorenzano estebanlm at gmail.com
Sat May 10 00:13:24 UTC 2008


Hi all,
I'm having problems with html request... onSuccess:, this is what i'm doing:

	html anchor
		class: #eventRefresh;
		onClick: (
			(html request 
				callback: [ Transcript show: 'REQ'; cr ]; 
				onSuccess: 'window.alert("OK")';
				onFailure: 'window.alert("Failure")'));
		with: [ html image url: SushiLibrary / #addPng ]

This is rendering all ok ('REQ' is being written on transcript window) 
... but onSuccess (or onFailure) is not being called after it...

This is de javascript generated with that call:

new 
Ajax.Request('http://localhost:8080/seaside/Sushimoto',{'onSuccess':function(){'window.alert("OK")'},'onFailure':function(){'window.alert("Failure")'},'parameters':['_s=BeRHEehLgPOyfdJU','_k=zvZqQkjr','11'].join('&')})

I 

asked at #prototype irc channel and someone tell me that I have to 
remove de ' of the 'onSuccess' (and I suppose is the same in the 
generated function) but i don't know how to do this (seems to has 
something to do with SUStream encode:to:, but if i remove the $' from 
the encoding, errors start to appear everywhere.

I don't know how to proceed from here...

I'm using Seaside2.8a1-lr.541 and Scriptaculous-mb.239 (I tried with 
lr.540 too) on a 3.10 image.

Thanks,
Esteban 




More information about the seaside mailing list