Author Topic: iframe help pleasee!!!  (Read 4604 times)

Offline hidden

  • ???
  • Posts: 1
iframe help pleasee!!!
« on: March 07, 2008, 09:25:33 AM »
hey everyone.  i'm re doing my site (it's not uploaded so i can't post a link) and i have iframes in it.  i need to put links in my iframe that will open up through the main page.  so for example.  lets say my main page is www.web-site.com and my iframe is www.web-site.com/iframe.html  and i have a link on the www.web-site.com/iframe.html that is being shown through the iframe on www.web-site.com.  i want to be able to click the link in the iframe and NOT have it open in the iframe.  does anyone know how to do this?  please help i need to this site up asap!! thanks so much!!

Offline hidden

  • Sami
  • Administrator
  • Senior Member
  • *****
  • Posts: 5924
  • Not a geek. Just a Nerd.
    • CSB Tutorials
Re: iframe help pleasee!!!
« Reply #1 on: March 07, 2008, 06:20:23 PM »
Iframes have certain rules you must follow.

The main page that holds your iframe usually has the links. 
These links change the contents of the iframe by using a target statement. 
If you name your iframe IFRAME1 then your links would have the target:    target="IFRAME1"

Code: [Select]
<a href="http://www.samisite.com/test-csb2nf/id58.htm" target="IFRAME1">Example 1</a>

Those content pages that appear within the iframe may or may not have links on them. Usually not.
You must use your target statement for each link to control where and how they open.
- If you want the links to open a NEW window outside of the existing main page and iframe, then the link should use target="_blank"
- If you want the links to open within the iframe, keeping the existing main page around the contents, then the link should use target="_self"
- If you want the links to open in the same window, replacing the main page that holds the iframe, then the link should use target="_parent" (or possibly target="_top")


Would love to see what you do with the iframe.

(I moved this post to the IFRAMES section of the forum for best organization).
-Samantha
TNG: "Sometimes, you can make no mistakes, do everything right, and still lose" - Capt Picard to Data
(:turtle: In memory of Turtle: May 22, 1944 - Nov 24, 2007  GURU, mentor, and really nice guy! :turtleleft: )