Hey Phlip, Phlip a écrit : > Christophe Porteneuve wrote: > I suspect it's the cleanest possible answer to the JavaScript/DOM FAQ > "How do I inject JavaScript into another frame and force it to run > inside that frame's context?"
Hmmmm if that frame is yours to play with at the DOM level, you can call JS methods in there that will have the proper window reference, even if you call them from another frame. You could also inject a synthetic <script> element in there. It's not necessarily cleaner, though. Maybe you actually need to run JS in another frame's context, and maybe not. If you're certain your need cannot be met in a less hackish way, then so be it! Real-world apps are full of circuituous yet legitimate needs, unfortunately. > Not sure why you are getting self-righteously indignant about the > prospect of me abusing the technique. If I don't use it for a public > website, then what's the problem? I'm sorry if I sounded like a whipmaster :-/ I'm here to help, as my track record on this group amply states. I'm just a fierce standardista, you know... :-) This specific case aside, be it on a public or private site, playing the standards as much as possible is always a good idea on the long run. Sincerely, -- Christophe Porteneuve aka TDD [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
