On 14/02/07, 15daysofjquery <[EMAIL PROTECTED]> wrote:
>
> How do I target an element inside of an iframe I've created on the page? In
> other words, I've used jQuery to create an iframe, and now I need to target
> all the p elements of the document inside that iframe.
>
> I've tried
>
>  $("p",self.MyIFrame.document).click(function(){alert('asdf');});
>
> and also
>
>  $("p",oIframe).click(function(){alert('asdf');});
>
> where oIframe is
> var oIframe = document.getElementById("if");
>
> The frame generated by jquery is straightforward:
>
>  $('div#results').empty().append('<iframe src="'+t+'" frameborder="1"
> width="90%" height="300px" id="if" name="MyIFrame"></iframe>');
>
> Thanks.
>
> --

Have you included jQuery in the target frame?

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to