Tearing my hair out!!!

MacKat

macrumors member
Original poster
Nov 9, 2004
35
0
St Neots, England
Arghhh!!! I decided to try and go through a tutorial in an Adobe Ideas book and try to apply the techniques to my own website.

I am totally stuck!! :'( 'All I want is for the purple box to change when you select one of the buttons on the left. Thats all.... I have put an iframe in place there but cant work out how to make it change when the links are pressed! I designed the site in Illustrator and sliced it - now I am working in GoLive.

All the links are external sites - like an invision forum board and xanga blogring. So all I need is that purple box to change to the xanga site when the blogs button is pressed etc.

Here is a screen shot :



Any help would be soooo appreciated - and may save me yet another migraine! :)

Thanks

Kat x
 

tobefirst

macrumors 601
Jan 24, 2005
4,066
1,165
St. Louis, MO
To get the website within the website look, is there any other way than by using frames? <--- Question to all the web experts.

I'm an amateur at best, and that's the only way that I can see that working.
 

kgarner

macrumors 68000
Jan 28, 2004
1,513
0
Utah
Did you set the target of the link to the iFrame? That should be all that is required.

And yes you need to use frames to do the page within a page thing.
 

MacKat

macrumors member
Original poster
Nov 9, 2004
35
0
St Neots, England
I am going to sound incredibly thick but I cant get this to work. On the target drop down window, I have _self, _top, _parent and _blank. No iframe option there.

Its driving me nuts and any very basic help will be more than appreciated! :)

Kat x
 

ITASOR

macrumors 601
Mar 20, 2005
4,400
3
Yup, you can use a simple PHP navigation. Play along with me, as I don't know PHP at all, so bare with me.

In the main table on the index.php (make sure it's .php or this won't work), put the following where you want the content of each subpage to be displayed:

<?php
switch($id) {
default:
include('page1.php'); // This is the default page that shows up first when your site is loaded.

break; case "page1":
include('page1.php'); // This tells the script that when you type in website.com/index.php?id=page1 to load page1.php

break; case "page2":
include('page2.php'); // Same here

break; case "page3":
include('page3.php'); // Keep repeating this as you need, you can change page1, 2, 3 obviously
}
?>

Now, on your links on the left, make the graphics link to links like the following:

http://www.maplejar.net/index.php?id=PAGENAME <-the page name would be the one for that page that you specified in the code above. If I followed the code above it would be /index.php?id=page1

Here's a start for you:

<?php
switch($id) {
default:
include('home.php'); // Linking to index.php will load home.php

break; case "theblogs":
include('theblogs.php');

}
?>

Where I have "// note" you can delete those, as those are just PHP notes. If you leave them there, everything will still work.

See the line "switch($id) {"? if you change "id" to something else like "page", you can now use links like maplejar.net/index.php?page=blah instead of ?id=blah.

You can also use links like maplejar.net/?id=page, because it knows index.php should be there.

If you use this method, which is WAYYYY better than inline frames, (iFrames), make sure your index ends with .php. The other pages don't need to end with .php, then can end in .html or .htm. Just make sure you also change that in the main code. (Change the break cases from page.php to page.html).

If that wasn't clear, let me know. :)

Good luck!
 

realityisterror

macrumors 65816
Aug 30, 2003
1,354
0
Snellville, GA
Yup. It might be easier to do it in the source code...
If your purple box's frame name is "purple_box" then change your link to:

Code:
<a href="forum/" target="purple_box">Forum</a>
Hope that helps,
reality
 

ITASOR

macrumors 601
Mar 20, 2005
4,400
3
If you want to do iFrames, the links on the left will look like this:

Say you named the iFrame "main":

<a href="home.html" target="main"><img border="0" src="image.ext"></a>

Hope that helps. If you only have choices, like _self, _blank, just type in "main" and it should let you do that.

-itasor
 

ITASOR

macrumors 601
Mar 20, 2005
4,400
3
realityisterror said:
Yup. It might be easier to do it in the source code...
If your purple box's frame name is "purple_box" then change your link to:

Code:
<a href="forum/" target="purple_box">Forum</a>
Hope that helps,
reality
Right, he has image links, though so instead of "Forum" it will have an image tag like
Code:
<img border="0" src="image.ext">
and then the
Code:
</a>
 

ITASOR

macrumors 601
Mar 20, 2005
4,400
3
Another thing to remember, is that it won't usually work inside your HTML editor, you're going to need to upload it and test it, or open it in Safari.

I would really recommend the PHP navigation method, as iFrames are often looked down upon as unprofessional. If it's just a personal site though, it's ok to use them.
 

MacKat

macrumors member
Original poster
Nov 9, 2004
35
0
St Neots, England
Thanks guys! :) Got the iframe bit to work in the end.. I will keep all these notes for the future as I am learning all the time. I opened the site prematurely as I didn't think it would do very well - but it has, so I am always in a rush to learn and complete the next thing - with absolutely no experience at all!:eek:

The only other thing(s) is that I would like to have a home page which has an introduction where the iframe is - is that possible at all? AND how to I add html - like the one for the BBC news box - next to the maplejar logo?

Thanks you are all great for helping :)

Kat x