Forum Moderators: open
Let's say I am on AIM and I want to link a friend to a certain page on my website that uses iFrames. Say the page I want to link him to is the 'FAQ' page. If I give him this link 'www.mysite.com/faq.html' it will just bring up that page and not bring it up inside the iFrame on index.html
How do I do this? I hope I have explained it well enough.
Thanks!
Any html document that is displayed within a frame or an iframe can (and should, IMO) also contain script that inserts it into its parent page in the event that someone comes there directly -- an "orphan"display of a page that is intended to have a "parent" . Search engines index frame documents a lot and send people directly to the orphan all the time.
Thid can be done with javascript. We have an example of how to do this with a regular frame page - but you can adapt the idea for an iframe page with just a few changes:
See Message #21 on:
[webmasterworld.com...]
<html>
<head>
<title>Master Frameset</title>
</head><script language="JavaScript" type="text/javascript">
origURL = parent.document.URL
contentURL = origURL.substring(origURL.indexOf('?')+1, origURL.length)
document.write('<iframe src="home.html" name="nav"><frame src=\"' + contentURL + '\" name="content"><\/iframe>')
</script>
</html>
So i make a whole new html document solely for this purpose, is this correct?