www.webdeveloper.com
Results 1 to 3 of 3

Thread: reaching elements inside of iframe

  1. #1
    Join Date
    Apr 2013
    Posts
    44

    Question reaching elements inside of iframe

    hi,

    i have a web page like in the figure.it is a page inside another page.
    when user clicks the blue circled button,google map is appearing.
    when user clicks this button an icon have id of goBack became visible on the right corner of sliden panel.
    when the user clicks goBack button,the page comes to its first position,where blur panel on it.
    i try some codes but it is not doing that i wanted.
    here is my website link
    Attached Images Attached Images

  2. #2
    Join Date
    Jun 2008
    Location
    Europe
    Posts
    1,096

    Cool

    You don't need to use jQuery to change content inside the iframe with buttons outside of that frame or even in another iframe, all you need to do is name the iframe and set the target for each button (link) to that frame.

    HTML Code:
    <iframe name="myiframe" width="100%" frameborder="0" scrolling="no" height="300">You need a frames compatible browser to view this content.</iframe><br />
    
    <a href="some-link.htm" target="myiframe">Button 1</a><br />
    <a href="some-other-link.htm" target="myiframe">Button 2</a><br />
    Post either a link to your page and/or the code and what exactly you would like to do.

    You might find your answer here: iFrame HTML

  3. #3
    Join Date
    Apr 2013
    Posts
    44
    i already put my site link.
    here is my website link
    i know target attribute but the thing that i want to do is quite different from this.i achieved some part of that.but some other will show itself.
    i mean:

    Code:
    $(function() {
    			child_frame = window.frames['iletisimSayfasi'].document;
    			$('div #maps a',child_frame).live({
    				click:function(){
        				$("#goBack").css('visibility','visible').stop().animate({opacity:1},2000,"swing");
    				}
    	
    			});
    			$("#goBack a").live({
    				click:function(){
    		    		$("#goBack").css('visibility','hidden').stop().animate({opacity:0},2000,"swing");
    				}
    			});
    		});
    the code do what i wanted but only once.i write live and toggle method for every click but it did not do.
    i'm trying to find a solution for this right now.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles