Sam wrote:
After retrieving a URL using an Ajax.Request...
function onComplete (request, json) {
// request.responseText holds the entire page
Only the content contained in elementID = 'source' is intended for display At this time, the following code works, but it disturbingly copies the entire page from the source URL into the target DIV $('target').innerHTML = request.responseText; // copy the entire page $('target').innerHTML = $('source').innerHTML; // remove everything bur the content of element 'source' Any suggestion for a method to copy only the innerHTML of 'source' ?

You'd probably have to use Javascript's regular expression matching
to extract the section of the page text string that's inside the tag
having the id="source" attribute.

--
We develop, watch us RoR, in numbers too big to ignore.

_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to