View Full Version : Please HELP! Again. Sorry...


twisted_dolly
07-08-2003, 05:39 PM
I've looked on loads of different sites for help with i-frames, including this one. I just can't understand it, I mean GRR. Right, well I've read it all, and I've done what it says. But to me it just looks like only one of my links can possibly change the content of the i-frame, but I want seven! I'm so confused. Please please PLEASE help me. I need basic simple steps. Here's my HTML: (Please tell me what I'm doing wrong) P.S. Sorry again, I'm new to all this.
<html>
<head><body background="http://www.thelostchild.150m.com/images/bg.jpg"></head><body bgcolor="#000000" text="#000000" link="#000000" vlink="#000000" alink="#000000">
<img src="http://www.thelostchild.150m.com/images/banner.bmp" width="638" height="106"><br><a href="www.thelostchild.150m.com/home1.html" target="frame<br><img src="http://www.thelostchild.150m.com/images/tbslogo.bmp"><div style="position: absolute; top:275; left:425;">
<IFRAME src="homeframe.html" name="frame" width="300" height="300" frameborder="0"></IFRAME></div> <title>The LoST ChiLd</title>
<style>body
{ background-color: #ffcc00;
font-family: Verdana;
color: white;
font-size: 10pt;
SCROLLBAR-BASE-COLOR: #000000;
SCROLLBAR-ARROW-COLOR: #999999; }
<body></style>
</body>
</html>

Dude128
07-08-2003, 05:46 PM
first of all, it may be a little easier to see what's wrong if your code is cleaned up a little.

keep in mind that the general format of the page should look like this:
<html>
<head>
<title>Title</title>
CSS, JavaScript, etc.
</head>
<body>
all your content
</body>
</html>
and you should only have one of each of those tags.

now, on to the problem:
any link can change the iframe, as long as it is targeted properly. since you have the name attribute of the iframe with the value "frame", that is also the target, as you did. but- watch out for quote marks. you're missing one after target="frame in your link. missing quotes and things could mess up your entire page :)

twisted_dolly
07-08-2003, 05:53 PM
So how can any link change the iframe? The code for the actual iframe needs to have a name, yeah? Say "home" so the link would be<a href= blah blah blah "home">Home</a> So if I have another link, lets say, pictures - how can it change the iframe, as the iframe is named home? Wouldn't I need to create another iframe named "pictures"? This is where I get confused... each site says something different :s Thankyou for yr help though.

Dude128
07-08-2003, 05:58 PM
let's back up a little.

you have a page with one iframe (with whatever name you want. we'll call it "frame" for simplicity) and several links.

you also have all the pages that you want to be displayed inside the iframe. they can be named whatever you want also. let's say you have home.html, pictures.html and bio.html

you just have to link to those pages (home, pictures, etc.) and target them, or tell them to open inside that iframe.

so you would have:
<a href="home.html" target="frame">Open home.html in the iframe</a>
<a href="pictures.html" target="frame">Change the iframe to display pictures.html</a>
<a href="bio.html" target="frame">Or open bio.html in the iframe</a>

twisted_dolly
07-08-2003, 06:01 PM
I understand now! Thank you SO much :) I really appreciate it <3

twisted_dolly
07-08-2003, 06:05 PM
One last thing. (Just one) When someone opens up the page and the iframe is there, before clicking on any links there will be text etc... within the iframe. Where do I fill in that text? So say someone types in the address of my site and theres an iframe that says "Welcome". They can then later on go on to click on links..etc.. Where would I put the word "Welcome"?
P.S. Thanks again :)

Dude128
07-08-2003, 06:14 PM
the src attribute in the <iframe> tag specifies what file is first displayed inside the iframe. so you would make another file with a welcome message or anything else you want, and put the URL of that file where it says <iframe src="page name here" ...>

twisted_dolly
07-08-2003, 06:18 PM
Oh I must be the most annoying person alive. Yup, thats right I found one more thing to ask. If I want the scrolly thing on my iframe, say green, would I put the codes with the iframe - or on the page inside the iframe?

Dude128
07-08-2003, 06:31 PM
no problem- we're here to help :)

the CSS code would have to go on the page(s) that get displayed inside the iframe. that page inside the iframe acts just like any other page- so CSS and backgrounds and everything go right on that page itself.