[jQuery] How to access contents of frames/iframes with jQuery?
Hi again!
(Second question in as many days... I guess I'm the overeager noob. :) )
Last night I watched John Resig's screencast "Hacking Digg with Firebug and jQuery" (<span style="font-style: italic;">
highly</span> recommended, BTW: <a href="http://ejohn.org/blog/hacking-digg-with-firebug-and-jquery/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://ejohn.org/blog/hacking-digg-with-firebug-and-jquery/
</a> ) and I immediately went to one of my favorite webapps and tried to put to use the ideas he presented, but right out of the gate I crashed against frames.
Or at least I <span style="font-style: italic;">think</span> that's what the problem was. For example, when I tried to evaluate jQuery expressions like <span style="font-family: courier new,monospace; font-weight: bold;">
$("div")</span>, the result printed by Firebug was <span style="font-family: courier new,monospace; font-weight: bold;">[ ]</span>, even though, according to Firebug's inspector, the page I was trying to dissect had plenty of divs. (BTW, this seemed odd to me, since it seems somehow to go against the "find things, do stuff" philosophy.)
Anyway, I did get reasonable-looking results when I tried
<span style="font-family: courier new,monospace; font-weight: bold;">$("frameset")</span> and <span style="font-weight: bold; font-family: courier new,monospace;">$("frame")</span>, but I can't figure out how to get past this point.
(BTW, I did try Firefox's "Show only this frame" command, but the server
basically vetoes the request and sends all the frames anyway.)
So my question is, can jQuery handle frames? More specifically, what jQuery functions would one use to find and manipulate the contents of a frame?
And what about iframes?
Thanks in advance!
kj
PS: I scanned the documentation in
<a href="http://docs.jquery.com/DOM/Traversing" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://docs.jquery.com/DOM/Traversing</a> , but I didn't find an answer.
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/