I have a page loaded. Now with Ajax requests, I had content to this page. I use element.insert(). Then on the element inserted, I do getElementsBySelector but this doesn''t work in IE (undefined). getElementsBySelector isn''t the only function that doesn''t work after en insertion in IE. How can I do to add prototype methods in IE after insertion ? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
It seems that getElementsBySelector exists but it doesn''t find anything on the inserted elements!!! Why the inserted elements can''t be found in IE ??? Thanks for your help On 25 oct, 10:30, choupigore <aurelien.bau...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have a page loaded. Now with Ajax requests, I had content to this > page. I use element.insert(). Then on the element inserted, I do > getElementsBySelector but this doesn''t work in IE (undefined). > getElementsBySelector isn''t the only function that doesn''t work after > en insertion in IE. How can I do to add prototype methods in IE after > insertion ?--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
IE doesn''t extend all elements at load time the way Firefox and Safari do. You have to explicitly extend each element (using $) before you use the additional Prototype methods. e.x. $(insertedElement).getElementsBySelector(sel); ... if this isn''t clear, or doesn''t solve your problem, show us the code that''s not working. TAG On Oct 25, 2007, at 3:36 AM, choupigore wrote:> > It seems that getElementsBySelector exists but it doesn''t find > anything on the inserted elements!!! Why the inserted elements can''t > be found in IE ??? > > Thanks for your help > > On 25 oct, 10:30, choupigore <aurelien.bau...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> I have a page loaded. Now with Ajax requests, I had content to this >> page. I use element.insert(). Then on the element inserted, I do >> getElementsBySelector but this doesn''t work in IE (undefined). >> getElementsBySelector isn''t the only function that doesn''t work after >> en insertion in IE. How can I do to add prototype methods in IE after >> insertion ? > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I add a block in the existing DOM. Example of code (all strings with [....] are replace by a real value and all ids are unique) : <li class="manageMyFriendsFriend" id="itemFriendInLeftBar[friendID]"> <input type="hidden" name="FriendId" value="[friendID]" ></input> <a href="javascript:void(0);" class="white_underline manageMyFriendsFriend" id="showFriendMoodMessageInLeftBarLink[friendID]"> <img src="images/icones/+iconeSex+.gif" alt=""/> <span name="friendConnectionState" class="[isOnlineClass]">[friendName]</span> </a> {include file="Models/ModelParts/wait_area.tpl" wait_area_id="waitForMovingFriendInLeftBar[friendID]"} <!-- toolTip area--> <div id="showFriendMoodMessageInLeftBar[friendID]" class="data_hidden area_on_top"> <div class="bubble_tab"><div class="tab"></div></div> <div class="bg_orange tooltip_content clearfix"> <div class="manageMyFriendsMoodTooltip">Humeur : [friendMoodName]</ div> <div class="manageMyFriendsMoodMessageTooltip">Message : [friendMoodMessage]</div> </div> </div> </li> After the insertion, in another action, I want to get the friend id so I do : var friendId = $(element).getElementsBySelector(''[name="FriendId"]'') [0].value; This line of code doesn''t work. In fact $ (element).getElementsBySelector(''[name="FriendId"]'') finds nothing in the DOM. I think the methods which is looking for elements (xpath I think) doesn''t look for inserted elements. So $ (element).getElementsBySelector(''[name="FriendId"]'')[0] returns undefined. I hope you understand my problem. How can I fix this error ? Thank you On 25 oct, 21:28, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> IE doesn''t extend all elements at load time the way Firefox and > Safari do. You have to explicitly extend each element (using $) > before you use the additional Prototype methods. > e.x. > $(insertedElement).getElementsBySelector(sel); > > ... if this isn''t clear, or doesn''t solve your problem, show us the > code that''s not working. > > TAG > > On Oct 25, 2007, at 3:36 AM, choupigore wrote: > > > > > It seems that getElementsBySelector exists but it doesn''t find > > anything on the inserted elements!!! Why the inserted elements can''t > > be found in IE ??? > > > Thanks for your help > > > On 25 oct, 10:30, choupigore <aurelien.bau...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> I have a page loaded. Now with Ajax requests, I had content to this > >> page. I use element.insert(). Then on the element inserted, I do > >> getElementsBySelector but this doesn''t work in IE (undefined). > >> getElementsBySelector isn''t the only function that doesn''t work after > >> en insertion in IE. How can I do to add prototype methods in IE after > >> insertion ?--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I have always the same problem. I insert en element and then in IE, sub elements are not accessible with prototype!! Isn''t a mistake in prototype ? How can I extend automatically inserted elements and their children ???? Thank you PS: I''m using proto 1.6.0_rc0 On 26 oct, 09:33, choupigore <aurelien.bau...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I add a block in the existing DOM. Example of code (all strings with > [....] are replace by a real value and all ids are unique) : > > <li class="manageMyFriendsFriend" id="itemFriendInLeftBar[friendID]"> > <input type="hidden" name="FriendId" value="[friendID]" ></input> > <a href="javascript:void(0);" class="white_underline > manageMyFriendsFriend" > id="showFriendMoodMessageInLeftBarLink[friendID]"> > <img src="images/icones/+iconeSex+.gif" alt=""/> > <span name="friendConnectionState" > class="[isOnlineClass]">[friendName]</span> > </a> > > {include file="Models/ModelParts/wait_area.tpl" > wait_area_id="waitForMovingFriendInLeftBar[friendID]"} > > <!-- toolTip area--> > <div id="showFriendMoodMessageInLeftBar[friendID]" > class="data_hidden area_on_top"> > <div class="bubble_tab"><div class="tab"></div></div> > <div class="bg_orange tooltip_content clearfix"> > <div class="manageMyFriendsMoodTooltip">Humeur : [friendMoodName]</ > div> > <div class="manageMyFriendsMoodMessageTooltip">Message : > [friendMoodMessage]</div> > </div> > </div> > </li> > > After the insertion, in another action, I want to get the friend id so > I do : > var friendId = $(element).getElementsBySelector(''[name="FriendId"]'') > [0].value; > This line of code doesn''t work. In fact $ > (element).getElementsBySelector(''[name="FriendId"]'') finds nothing in > the DOM. I think the methods which is looking for elements (xpath I > think) doesn''t look for inserted elements. So $ > (element).getElementsBySelector(''[name="FriendId"]'')[0] returns > undefined. > > I hope you understand my problem. How can I fix this error ? > > Thank you > > On 25 oct, 21:28, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote: > > > IE doesn''t extend all elements at load time the way Firefox and > > Safari do. You have to explicitly extend each element (using $) > > before you use the additional Prototype methods. > > e.x. > > $(insertedElement).getElementsBySelector(sel); > > > ... if this isn''t clear, or doesn''t solve your problem, show us the > > code that''s not working. > > > TAG > > > On Oct 25, 2007, at 3:36 AM, choupigore wrote: > > > > It seems that getElementsBySelector exists but it doesn''t find > > > anything on the inserted elements!!! Why the inserted elements can''t > > > be found in IE ??? > > > > Thanks for your help > > > > On 25 oct, 10:30, choupigore <aurelien.bau...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> I have a page loaded. Now with Ajax requests, I had content to this > > >> page. I use element.insert(). Then on the element inserted, I do > > >> getElementsBySelector but this doesn''t work in IE (undefined). > > >> getElementsBySelector isn''t the only function that doesn''t work after > > >> en insertion in IE. How can I do to add prototype methods in IE after > > >> insertion ?--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On Fri, Nov 02, 2007 at 05:07:04AM -0700, choupigore wrote:> > I have always the same problem. I insert en element and then in IE, > sub elements are not accessible with prototype!! Isn''t a mistake in > prototype ? How can I extend automatically inserted elements and their > children ????http://prototypejs.org/learn/extensions> Thank you--Greg> On 26 oct, 09:33, choupigore <aurelien.bau...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I add a block in the existing DOM. Example of code (all strings with > > [....] are replace by a real value and all ids are unique) : > > > > <li class="manageMyFriendsFriend" id="itemFriendInLeftBar[friendID]"> > > <input type="hidden" name="FriendId" value="[friendID]" ></input> > > <a href="javascript:void(0);" class="white_underline > > manageMyFriendsFriend" > > id="showFriendMoodMessageInLeftBarLink[friendID]"> > > <img src="images/icones/+iconeSex+.gif" alt=""/> > > <span name="friendConnectionState" > > class="[isOnlineClass]">[friendName]</span> > > </a> > > > > {include file="Models/ModelParts/wait_area.tpl" > > wait_area_id="waitForMovingFriendInLeftBar[friendID]"} > > > > <!-- toolTip area--> > > <div id="showFriendMoodMessageInLeftBar[friendID]" > > class="data_hidden area_on_top"> > > <div class="bubble_tab"><div class="tab"></div></div> > > <div class="bg_orange tooltip_content clearfix"> > > <div class="manageMyFriendsMoodTooltip">Humeur : [friendMoodName]</ > > div> > > <div class="manageMyFriendsMoodMessageTooltip">Message : > > [friendMoodMessage]</div> > > </div> > > </div> > > </li> > > > > After the insertion, in another action, I want to get the friend id so > > I do : > > var friendId = $(element).getElementsBySelector(''[name="FriendId"]'') > > [0].value; > > This line of code doesn''t work. In fact $ > > (element).getElementsBySelector(''[name="FriendId"]'') finds nothing in > > the DOM. I think the methods which is looking for elements (xpath I > > think) doesn''t look for inserted elements. So $ > > (element).getElementsBySelector(''[name="FriendId"]'')[0] returns > > undefined. > > > > I hope you understand my problem. How can I fix this error ? > > > > Thank you > > > > On 25 oct, 21:28, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote: > > > > > IE doesn''t extend all elements at load time the way Firefox and > > > Safari do. You have to explicitly extend each element (using $) > > > before you use the additional Prototype methods. > > > e.x. > > > $(insertedElement).getElementsBySelector(sel); > > > > > ... if this isn''t clear, or doesn''t solve your problem, show us the > > > code that''s not working. > > > > > TAG > > > > > On Oct 25, 2007, at 3:36 AM, choupigore wrote: > > > > > > It seems that getElementsBySelector exists but it doesn''t find > > > > anything on the inserted elements!!! Why the inserted elements can''t > > > > be found in IE ??? > > > > > > Thanks for your help > > > > > > On 25 oct, 10:30, choupigore <aurelien.bau...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > >> I have a page loaded. Now with Ajax requests, I had content to this > > > >> page. I use element.insert(). Then on the element inserted, I do > > > >> getElementsBySelector but this doesn''t work in IE (undefined). > > > >> getElementsBySelector isn''t the only function that doesn''t work after > > > >> en insertion in IE. How can I do to add prototype methods in IE after > > > >> insertion ? > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---