PDA

View Full Version : scriptacolous and dynamic driver



nephilimdie
08-21-2007, 07:43 PM
scriptacolous and dynamic driver

the link:
http://nephilimdie.altervista.org/asa/form/

hi guys!!
sorry for my english, bu i'm italian!! :)
i have this problem
this is my function from scriptacolous.
here, i create a windows where i have a object. Because the object is more big, i prefer insert in my code the animated collapse!
i think: the designed is cool, but it don't work, and i don't know a problem?
why?
firebug of firefox:
collapse2 is not defined
when is defined?
why?
i deprived of hope!!



function crea(elemento,sito,area,contesto,illlustrazionec,notec,classe,tipo,materiale,dimensioni,numeroscavo,luogo,numeromuseo,illustraazionep,biblio,noteg)
{
var nome_elemento ="cat";
// var collapse2 = new animatedcollapse("cat", 500, true);

if(!$('obj'+elemento)){

newitem=Builder.node( 'li', {className:'item',id:'obj'+elemento}, [Builder.node( 'div', {className:'handle'},'Oggetto'+elemento)] );
newchiudi=Builder.node( 'div', {className:'chiudi'});
newlink=Builder.node( 'a', {href:'javascript:rimuovi('+elemento+')', className:'chiudilink'},'x');

newdivexpand=Builder.node( 'div', {className:'espandi'});
newespandi=Builder.node( 'a', {href:'javascript:collapse2.slideit()', className:'espandi_finestra'},'espandi');

newitem.appendChild(newdivexpand);
newitem.appendChild(newchiudi);
newdivexpand.appendChild(newespandi);
newchiudi.appendChild(newlink);
$('firstlist').appendChild(newitem);


$('obj'+elemento).innerHTML=$('obj'+elemento).innerHTML+'sito'+sito+'&nbsp;&nbsp;area<br>'+area+'contesto'+contesto+' ';
$('obj'+elemento).innerHTML+='<div id=\"'+nome_elemento+'\">&nbsp;&nbsp;illlustrazionec<br>'+illlustrazionec+'notec&nbsp;&nbsp;'+notec+'classe<br>'+classe+'tipo&nbsp;&nbsp;'+tipo+'materiale<br>'+materiale+'dimensioni&nbsp;&nbsp;'+dimensioni+'numeroscavo<br>'+numeroscavo+'luogo&nbsp;&nbsp;'+luogo+'numeromuseo<br>'+numeromuseo+'illustraazionep&nbsp;&nbsp;'+illustraazionep+'biblio<br>'+biblio+'noteg<br>'+noteg+'</div>';
$('obj'+elemento).innerHTML+='<script type=\"text/javascript\">var collapse2=new animatedcollapse(\"cat\", 800, true);</script>';
//document.getElementById('id_generico').innerHTML+=' <script type="text/javascript">var collapse2=new animatedcollapse("'+nome_elemento+'", 500, true); </script>';

rendisortable();
}

}


sorry for my english!!

and thanks so!!1

bye!

nep