Hi, > (I can't provide an example, because the script is not standalone).
But it sounds as though you've debugged this to the point you could *create* a standalone test case replicating the problem fairly easily, whereas anyone else is going to be guessing at the things you already know. Can you give it a try? Sounds like it _may_ be a bug in Prototype in that specific situation, with that specific browser. A simple, standalone test case is the first step to getting that resolved. -- T.J. Crowder Independent Software Engineer tj / crowder software / com www / crowder software / com On Nov 25, 11:17 am, mindVex <simon.sat...@googlemail.com> wrote: > Hi, > > I'm using the .replace()-Method to replace HTML content. I need the > previous element that gets replaced so I'm using the return value of > this function. In IE8 this returns an empty string in a specific case > (I can't provide an example, because the script is not standalone). > > I did some research and found out that IE8 calls > Element.Methods.replace in line 2770 (Prototype 1.7), where Mozilla > does call "replace" in line 2059. > > Element.Methods.replace does some stuff and finally replaces the > original elements outerHTML with the new content which gets stripped > somehow (line 2791). > > Finally it seems to me it returns the orginal element that should be > replaced, but already modified with the new content in line 2791, > where it becomes an empty string. > > So I basically have two questions: > > 1. To dig a little bit further why this happens, can someone explain > when exactly this method is called? IE doesn't seem to fire it on > every replace() call. > > 2. It seems wrong to me that this function returns the modified > original element instead of just returning the original element. Is > this expected behaviour here? -- 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 prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.