hi thanks for your response
more precisions: i m using rico (2.0rc2) with protoype.js and this code : http://pastie.org/302127 i don t write this code, just use it and try to understand it ;) (see http://www.ajaxprojects.com/ajax/tutorialdetails.php?itemid=65) all working fine with prototype.js (1.4) but when i m upgrading to prototype.js 1.6 the line 6 (http://pastie.org/302127) is not working as i say in my previous message because in prototype.js (1.6) at line 2501 (var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];) new Element('div'), not working...but i don t know why if i replace new Element('div') by document.createElement("div"); all working fine. On 28 oct, 10:58, "T.J. Crowder" <[EMAIL PROTECTED]> wrote: > Hi, > > > when i m using this code :new Element.insert(div, {top:content}); > > Two things come to mind: > > 1. What is assigned to "div"? It's a variable in that > snippet...what's in it? > > 2. That syntax looks problematic to me. "new Element.insert(div, > {top:content});" tries to use the function Element.insert as a > constructor. > > Did you mean "(new Element('div')).insert({top: content});"? I made > two changes there: I put 'div' in quotes and used Element as the > constructor. > > If the above doesn't help, try creating a small self-contained example > that demonstrates the problem and posting it to Pastie[1]. You might > figure it out by doing that, but if not it gives us a complete example > to look at. > > [1]http://pastie.org > > HTH, > -- > T.J. Crowder > tj / crowder software / com > > On Oct 28, 9:43 am, PAM <[EMAIL PROTECTED]> wrote: > > > hi all, > > > i m working with prototype.js 1.6 and drag n drop > > > when i m using this code :new Element.insert(div, {top:content}); > > > i m passing into this method : > > > Element._getContentFromAnonymousElement = function(tagName, html) { > > var div = new Element('div'), t = > > Element._insertionTranslations.tags[tagName]; > > if (t) { > > div.innerHTML = t[0] + html + t[1]; > > t[2].times(function() { div = div.firstChild }); > > } else div.innerHTML = html; > > return $A(div.childNodes); > > > }; > > > but var div = new Element('div') is not working... my javascript > > stop here, but if i replace this line by > > var div = document.createElement("div"); > > > all is working fine.. > > > someone can help me to find why first solution is not working? > > > thanks by advance --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
