Displaying 1 result from an estimated 1 matches for "stripscri".
Did you mean:
stripcr
2005 Dec 15
0
RJS Templates and the Replace semantics
...end
end
end
end
end
Add this code to your application javascript file:
// Extend the object for our RJS extension to work
Object.extend(Element, {
replace: function(element, html) {
var el = $(element);
if (el.outerHTML) { // IE
el.outerHTML = html.stripScripts();
} else { // Mozilla
var range = el.ownerDocument.createRange();
range.selectNodeContents(el);
el.parentNode.replaceChild(range.createContextualFragment(html.stripScri
pts()), el);
}
setTimeout(function() {html.evalScripts()}, 10);
}
}
);
_____________...