Is it just me,... I don't understand what you're even asking/trying to accomplish? What kind of "DOM" object are you hoping to create? Call it a potayto, or a potahto but any "element" you insert the HTML into is a "wrapper".
Apologies if this seems terse but I truly do not understand your question/goal. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Luke Sent: Tuesday, December 07, 2010 9:59 AM To: Prototype & script.aculo.us Subject: [Proto-Scripty] Re: How to create a new DOM-element from a string? Hm ok, hoped there would be a way I could generate a DOM object that consists of just the HTML (without wrapper) and before I insert it. On Dec 7, 4:52 pm, Walter Lee Davis <[email protected]> wrote: > That's because I called innerHTML on it at the end, and that returns a > string. If you then want to create a new element out of that, you > could try inserting it into your page somewhere with > > $('someElementOnYourPage').insert({after: foo}); > > Of you could just leave the innerHTML part off the end, which would > leave foo populated with the outer wrapper object created by new > Element... > > Walter > > On Dec 7, 2010, at 3:20 AM, Luke wrote: > > > > > Hmm, damn. the returned value is still a string :( > > > On Dec 7, 9:16 am, Luke <[email protected]> wrote: > >> Thanks Walter! > > >> On Dec 6, 6:28 pm, Walter Lee Davis <[email protected]> wrote: > > >>> On Dec 6, 2010, at 12:12 PM, Walter Lee Davis wrote: > > >>>> It's OT for this list, but have a look at Prototype.js. You can > >>>> create a new DOM element in memory, and do all the things you want > >>>> to it without ever showing it to the user. > > >>> Sorry, this was completely bone-headed of me -- I thought I was on > >>> another list. > > >>> Walter > > > -- > > 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 > > athttp://groups.google.com/group/prototype-scriptaculous?hl=en > > . -- 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. -- 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.
