Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I-frame issue :s

Status
Not open for further replies.

budgy

Programmer
Jan 4, 2005
73
GB
Hi guys,

Really hope you can help me out here. The problem is that Ive recently designed a news website, which must reside within the constraints of another website (head office site), via the use of a iframe. This news website is also available as a stand alone site for stores to view. The problem is that the Heaf office default page contains stories related to the news website and i can not figure out a way of directly linking these stories to the stories within the iframed news site....

I know this is pretty confusing, if there are any futher explanations required please do ask. I honestly appreciate any help or advise.

Look forward to hearing from you guys!!

"He that asks a question is a fool for a moment, he that never asks a question is a fool all his life
 
You should be able to do this with simple HTML, no JS required.

Give your iframe a name, say "newsFrame":

Code:
<iframe name="newsFrame">

And then target your links to it, adding an anchor reference if needed:

Code:
<a href="someNewsPage.html#newsStory1" target="newsFrame">link</a>

If you want to go down this HTML-only route, you'd need to ask any further questions in the HTML forum (forum215).

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Hey thanks a lot Billy,

The only problem is that my iframe to the newswebsite is located on a separte page and on the default of head office, is there a way around this in HTML? and if its not a bother would you mind explaining what a anchor reference is?..

Thank you so much, id post this question in the HTML forum, but since uve answered it here, i thought best to reply here...



"He that asks a question is a fool for a moment, he that never asks a question is a fool all his life
 
my iframe to the newswebsite is located on a separte page and on the default of head office, is there a way around this in HTML?

Of course - simply put the absolute URL to the file in, rather than just a relative URL.

Hope this helps,
Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top