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
-~----------~----~----~----~------~----~------~--~---