Hi, I have an inplace editor and I can access the innerHTML value of the created form. However the innerHTML gives "<textarea>....</textarea> ..." How can I access the textarea value? I tried to do innerHTML.textarea.value but it didn''t work. Any ideas will be appreciated. Thanks, Joe -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
It looks like your in-place editor contains a text area that it is manipulating. You could try innerHTML.textarea.innerHTML to get the content of the text area. But, the in-place editor probably has a documented way to access the content that uses JavaScript. Michael On Apr 13, 9:09 am, Joe Val <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, > > I have an inplace editor and I can access the innerHTML value of the > created form. However the innerHTML gives "<textarea>....</textarea> > ..." > > How can I access the textarea value? I tried to do > innerHTML.textarea.value but it didn''t work. Any ideas will be > appreciated. > > Thanks, > Joe > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
MichaelLatta wrote:> It looks like your in-place editor contains a text area that it is > manipulating. > > You could try innerHTML.textarea.innerHTML to get the content of the > text area. But, the in-place editor probably has a documented way to > access the content that uses JavaScript. > > MichaelThank you, Michael. <a href="#" onclick="alert($(''jot_jot_<%=@jot.id%>_in_place_editor-inplaceeditor'').innerHTML)">*t</a> produces: ''<textarea name="value" ... > ... </textarea> ...'' <a href="#" onclick="alert($(''jot_jot_<%=@jot.id%>_in_place_editor-inplaceeditor'').innerHTML.textarea.innerHTML)">*text.iH</a> produces: Error: $("jot_jot_1046_in_place_editor-inplaceeditor").innerHTML.textarea has no properties Line: 1 I can access the value of the textarea field when I use <a href="#" onclick="alert(document.getElementsByName(''value'')[0].value)">*elementsbyname</a> However, if there are two inplace editors "open" on the screen then the above call for the second editor returns the value of the first one. Thank you for any insight you can provide. Joe -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---