Hmm. What if you added 'id=body' to your inner HTML, and try that
first? Would that eliminate the extra tags? That seems clearer, and
at least doesn't complicate the API.
-- Ernie P.
On Jan 4, 2006, at 3:12 PM, Justin Maxwell wrote:
On 4 Jan 2006, at 14:43, Dr. Ernie Prabhakar wrote:
If I'm right, then this is even more obnoxious than I thought.
What did you think of my suggestion of adding a "source" div to
the AHAH call? Would that actually make your life simpler, by
allowing you to 'host' all your AHAH fragments on a single page?
I think we can be even more specific than that: source is "body".
Part of the attraction to AHAH, for me, is its conceptual
simplicity. I already feel like I'm cheating by passing functions
to it, but I need that for my application.
There would be two ways off the top of my head to do this while
still respecting AHAH's use of responseText instead of responseXML.
1. regexp match relevant content (ALL content NOT INCLUDING content
type declarations or <head>.*</head> elements.
2. dump the content in as usual, and remove any nodes matching
'link', 'title' or 'meta' from the destination node
The response text contains everything -- body tag and all, but once
it's assigned to a node via innerhtml (even an "html" element
created via createElement), it loses the body. So we can't
getElementsByTagName('body'). I think option 1 is pretty solid,
but I'd like to hear other opinions on it.
_______________________________________________
microformats-rest mailing list
[email protected]
http://microformats.org/mailman/listinfo/microformats-rest
_______________________________________________
microformats-rest mailing list
[email protected]
http://microformats.org/mailman/listinfo/microformats-rest