I have a method that does something, and it puts a javascript method into the page that it uses. I need to make sure that it only puts the javascript method in once regardless of how many times it is called.
What's the best way to do this? Can I search the section of page that has rendered so far and see if the method was already created?