So basically it's equating to "this.remove()".
This is why creating global functions on a page has gone the way of the dinosaurs (namespace collisions, or also called "polluting the global namespace").
I recommend that you consider authoring all your home grown functions inside your own namespace object to avoid these problems (with prototype or any other library you end up using)...
var MPeters = {};
MPeters.remove = function() {...}
<input type="button" value="Delete" />
On 10/20/06,
Michael Peters <[EMAIL PROTECTED]> wrote:
So prototype provides Element.remove(). In an html file I also have a function
named remove(). Why do these clash when I do the following:
<input type="button" value="Delete" />
Instead of calling the remove function I defined, it actually removes the delete
button.
--
Michael Peters
Developer
Plus Three, LP
Athena Group, Inc.
Inquire: 1-920-955-1457
Blog: http://www.someElement.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
- [Rails-spinoffs] Element.remove() function clash Michael Peters
- [Rails-spinoffs] Re: Element.remove() function clash Ryan Gahl
- [Rails-spinoffs] Re: Element.remove() function cla... Michael Peters
- [Rails-spinoffs] Re: Element.remove() function clash Brad Ediger
