[Seaside] How to use jQuery get
Francisco Martins
chicoary at gmail.com
Sat Feb 18 17:08:32 UTC 2012
Again I'm playing around with the Seaside and the examples I found on
the book site of JQuery In Action, Second Edition.
I tried to render the code
"$.get(
'dom.sample.html',
function(data){
$('#sampleDOM').html(data);
$('#sampleDOMCode
pre').html(data.replace(/</g,'<').replace(/>/g,'>'));
});"
with the following code
html jQuery get
url: 'dom.sample.html';
onSuccess: (
JSStream new
nextPutAll: '$(''#sampleDOM'').html(data);';
nextPut: Character cr;
nextPutAll: '$(''#sampleDOMCode
pre'').html(data.replace(/</g,''<'').replace(/>/g,''>''));'
)
that generated the following
$.get("dom.sample.html",function(){$('#sampleDOM').html(data);
$('#sampleDOMCode pre').html(data.replace(/</g,'<').replace(/>/g,'>'));});
when it should generate
$.get('dom.sample.html',function(data){$('#sampleDOM').html(data);
$('#sampleDOMCode
pre').html(data.replace(/</g,'<').replace(/>/g,'>'));});
I do not know how to make the argument "data" in "function (date)" is rendered.
Does anyone know?
Already thank you for your attention.
--
Sds.,
Francisco Ary Martins
http://chicoary.wordpress.com
----
"A filosofia não é senão uma poesia sofisticada."
Montaigne
More information about the seaside
mailing list