On Nov 26, 2007 9:22 PM, symfony <[EMAIL PROTECTED]> wrote:
>
> Hello,
> I've got a problem using Element.insert('<div id="test"
> class="testclass">testdiv</div>');
Hi,
The first argument to Element.insert should be the element that is the
reference of insertion. Try doing this:
Element.insert(document.body, '<div id="test"
class="testclass">testdiv</div>');
An alternative format we prefer is calling the method directly on element
objects. That way you don't have to specify the target as first argument:
$(document.body).insert("...")
Mind that this is a group for developers discussing core features of the
framework. For questions like yours, post to rubyonrails-spinoffs. Thanks,
- M
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---