>>Can anyone recommend good books, online tutorials, or any other learning
>>materials for Javascript - specifically Object Oriented Programming using
>>JS?
I've found the following site is a nice introduction for javascript
newbies who have an OO background:
http://www.multitask.com.au/people/
For removing or changing a given element, these two functions (from
the element object) seem the business
remove: function(element) {
Element = $(element);
Element.parentNode.removeChild(element);
},
update: function(element, html) {
$(Element).innerHTML = html.stripScripts();
All,
I'm a big fan of the Insertion.* classes in prototype
(Insertion.Before, Insertion.After, Insertion.Top, Insertion.Bottom).
These classes solve the problem of adding new html to existing html
in the desired place. Very useful.
But what about replacing one chunk of HTML with another? Or