here the ajax updater
--------------------
function getSnippsetAlbum(albumId){
var url = '/snippset/albumpicture/'+ albumId ;
var pars = null;
var myAjax = new Ajax.Updater(
'album',
url,
{
method: 'get',
parameters: pars,
insertion:Insertion.Bottom,
onComplete:registerAlbum,
evalScripts: true
});
}
--------------------------
one result to a call
--------------------
<div id="album_c487feedc3907d40982f96a39e795b96" class="album"
style="position: relative; width: 100%; display: none;" >
<div id="thumb_ca6d0b1d9691ad8fee73b41b415bd689_10" class="thumbnail"
style="position: relative;"></div><div
id="thumb_c99f46ba3eea5e39f9a5e0b9252bcef0_11" class="thumbnail"
style="position: relative;"></div>
</div>
<script type="text/javascript" >
getData=function(){
return {id:'album_c487feedc3907d40982f96a39e795b96',name:'my
Name' };;
}
</script>
--------------------------
another call
--------------------------
<div id="album_4ae22d06a2546888405b63cc38ec07bd" class="album"
style="position: relative; width: 100%; display: none;" >
<div id="thumb_8c39d640d854c5b42cada751ae4e89e6_10" class="thumbnail"
style="position: relative;"></div>
<div id="thumb_c99f46ba3eea5e39f9a5e0b9252bcef0_20" class="thumbnail"
style="position: relative;"></div>
<div id="thumb_c99f46ba3eea5e39f9a5e0b9252bcef0_25" class="thumbnail"
style="position: relative;"></div>
</div>
<script type="text/javascript" >
getData=function(){
return {id:'album_4ae22d06a2546888405b63cc38ec07bd',name:'my
another Name' };;
}
</script>
------------------------------
and here the callBack
------------------------------
function registerAlbum(){
var albumData=getData();
albumColl.add(new Album(albumData));
}
-------------------------------
that is it folks
cedric
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---