PDA

View Full Version : IFrame Help



Shibby-Shabs
25-08-2009, 08:02 AM
First if you are going to reply DO NOT give feedback, I was wondering if I had a website template like the one displayed below how would I get it so when somebody presses the downloads button instead of it going to /downloads.html it would open up in the content ?

In other words.. When you click a navigator link it opens up in the content box.

Template Example..
http://i31.tinypic.com/9jhhdf.png

VirtualG
25-08-2009, 08:27 AM
Very easily, when you make an <a href="#">Navigation</a> You should put a target. <a href="#" target="main">Navigation</a> Buy giving it a target thats where the link will open. I just told it to open in main. You can tell it to open in _blank which is new window or _same (i think, I dont use it) for the same window.Since I told it to open in main it will now be looking for an iframe called main so, inside the main content area, you enter the following code:
<iframe src="#" id="main" name="main" width="100%" onload="calcheight()">Your broswer doesn't support iframes</iframe>
Except you can leave out the whole onload bit but you would want to learn how to use that soon. If you need more help I can do it for but you should be able to look up some tut's on youtube and I always found w3 helpful when I was starting out!
Note: I probably made a few spelling errors, I had to rush it...

Shibby-Shabs
25-08-2009, 08:42 AM
Thats for the help I get it completely exept! <iframe src="#" id="main" name="main" width="100%" onload="calcheight()">Your broswer doesn't support iframes</iframe>

where it says src="#" is normally your page so what do I put there in this case?

VirtualG
25-08-2009, 09:03 AM
Well, what I would do is get the content that you had before you put the iframe there from your home page and make a new htm document called home.htm, you then put the src as home.htm and when you enter your site it will display everything as it does now, but when you click a link with the target as main the homepage content will change. get it?

Shibby-Shabs
25-08-2009, 09:20 AM
Thanks for the help Man!
+rep

Want to hide these adverts? Register an account for free!