Ahh, that works.  Thanks Tobie/Diodeus!


On Jan 2, 2008, at 2:07 PM, Tobie Langel wrote:


Hi,

any of the below will work:

$('bodyId').insert('<p>This is my inserted paragraph</p>');

or:

$('bodyId').insert({bottom: '<p>This is my inserted paragraph</p>'});

or:

$('bodyId').insert(new Element('p')).down().update('This is my
inserted paragraph');;

Best,

Tobie



On Jan 2, 10:02 pm, Diodeus <[EMAIL PROTECTED]> wrote:
> Try this:
>
> $("bodyId").insert(new Element("p", { id: "moo" }))
> $('moo').innerHTML="This is my inserted paragraph"
>
> On Jan 2, 3:40 pm, bcamp1973 <[EMAIL PROTECTED]> wrote:
>
>> I'm trying to use prototype's insert() method. I'm not getting the
>> results i'm expecting. Can someone elaborate on it's usage or tell me
>> what i'm doing wrong? The API docs are pretty sparse on it...
>
>> I'm expecting this...
>
>> $('bodyId').insert('<p>','This is my inserted paragraph')
>
>> To give me this...
>
>> <body id="bodyid">
>
>>    ...hardcoded content here...
>
>>    <p>This is my inserted paragraph</p>
>
>> </body>
>
>> ...however, all i'm getting is a "<p>" tag at the bottom of the
>> "<body>" and no content...what am i doing wrong?



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

Reply via email to