Results 1 to 7 of 7

Thread: iframe

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Posts
    72

    iframe

    in the main page there are

    Code:
    <html>
    <body>
    <iframe name="footer" src="new_page_4.htm">
    </iframe>
    </body>
    </html>
    in "new_page_4.htm" there are :

    Code:
    <Script>document.location.href='1.html'</Script>
    the problem is when the main page loaded the page "1.html" show in iframe (footer) .. what is the code which make the page "1.html" show in the main page . ??
    Last edited by ayman_rapper; May 25th, 2005 at 08:54 AM.

  2. #2
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: iframe

    Well, you could try using the parent key word and see if that works

    Code:
    <Script>parent.document.location.href='1.html'</Script>
    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  3. #3
    Fanatic Member ALL's Avatar
    Join Date
    Jul 2004
    Location
    192.168.1.1
    Posts
    711

    Re: iframe

    try putting this in the iframe page (in the header):
    Code:
    <base target="_parent">
    Please support one of my projects?
    TKForums.com

    Web Forum
    JavaScript Wiki
    ________________________
    If somone helps you, please rate their post, by clicking the to rate their post

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Posts
    72

    Re: iframe

    doesn't work .......

  5. #5
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: iframe

    Quote Originally Posted by ayman_rapper
    doesn't work .......
    Did you try both of the examples...?



    RyanJ
    My Blog.

    Ryan Jones.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Posts
    72

    Re: iframe

    this is the code of the main page

    Code:
    
    <html>
    <head>
    
    </head>
    
    <frameset cols="152,*" border=0>
    		<frameset rows="120,*"  border="0">
    		<frame name="pic" src="st_picture.asp" noresize scrolling="no" marginwidth="0" marginheight="0" >
    		<frame name="rtop" src="left4.asp" noresize scrolling="no" marginwidth="0" marginheight="0">
    		</frameset>
    		<frameset border="0" rows="80,*,40" marginwidth="0" marginheight="0">
    			<frame name="banner" scrolling="no" noresize src="banner.asp" marginheight="0" marginwidth="0" target="contents">
    		    <frame name="left" noresize src="main4.asp" scrolling="auto" marginwidth="0" marginheight="0" target="main">
    			<frame name=footer src=footer.asp marginwidth="0" marginheight="0" noresize scroll=no target="_self">
    		
    		</frameset>
      <noframes>
      <body >
    
      <p>This page uses frames, but your browser doesn't support them.</p>
      </body>
      </noframes>
    </frameset>
    
    </html>

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Posts
    72

    Re: iframe



    finally


    <Script>parent.parent.document.location.href='http://...'</Script>


    thanks


    bye

Posting Permissions

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



Click Here to Expand Forum to Full Width