Google Groups Home
Help | Sign in
Message from discussion how to address to iframe content with jquery ?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
EugeneS  
View profile
 More options Mar 12, 7:47 pm
From: EugeneS <SEuge...@gmail.com>
Date: Wed, 12 Mar 2008 16:47:32 -0700 (PDT)
Local: Wed, Mar 12 2008 7:47 pm
Subject: how to address to iframe content with jquery ?
Hello,

so lets imagine i have some iframe inside my html page:
<iframe width="750" scrolling="no" height="255" src="http://
www.some_url.com/some_page.htm"></iframe>

how can i work with the loaded content ?

i was trying something like:
aa = $('iframe').html();

$("div > img", $(aa)).each(
                                        function(){
                                                                if ($(this).parent('div').attr('style'))
                                                                {
                                                                        $(this).parent('div').click(function(){
                                                                                                                                                alert("Hello2");
                                                                                                                                });
                                                                }
                                        });

to clarify this: i want to add onClick event to some IMG which is
inside DIV and this DIV inside this url http://www.some_url.com/some_page.htm
which is loaded in IFRAME...

how can i add some onClick event to some image which is loaded in
iframe ?

finally stuck :(


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google