Jump to content

Trouble with page layout (iframes bad!)


rrmosby

Recommended Posts

Sorry about the nondescript title but I couldn't think of anything to relate to this situation.

 

I want to make a nice site for dad for his birthday, but it's starting to turn into a mess!

 

I have a Gallery2 installation of his art on his site and I was wondering if there was any way to have a page not refresh when a link is clicked, yet just refresh a certain part in the page.

 

This may sound complicated but what I'm wanting to do is

 

Web page:

+-------+ +-------+

| gallery | | album |

| -intro. | | page- |

+-------+ +-------+

 

When someone clicks a thumbnail on the album page, I want it to open in the first box.

+------+ +-------+

| photo | | album |

| page. | | page- |

+------+ +-------+

 

Original solution: I tried doing this by using the first box (gallery intro/photo page) as an iframe. The second box was an overscroll div box.

Problem: When I would click a navigational link (First/Previous/Next/Last) on the album page, it would refresh the entire page, sending the photo page back to the gallery intro, when I wanted it to stay on the photo page.

 

Next solution: I tried turning the album page box also into an iframe, because I knew the photo page wouldn't refresh when I clicked a navigation link on the album page.

Problem: I just feel like now I'm making things much too complicated, because if I want to click an Edit link on either page, it's going to open in that small iframe, which isn't big enough for all that. If I tell the Edit link to open up on the whole page (target="_top") then what are they going to get if they happened to click 'back'? If I put a link for them to go back, I'm not going to be able to get the whole iframe pages set back up, it won't be the right photo page in the first box and it may not be the right page in the album box. It'd probably go back to the gallery intro page and the first page of the album. It also would be a pain to tell Gallery2 that only the Edit pages should have a full layout and use the main part of the Edit page as an overscroll div rather than an iframe.

 

I don't want to use Flash because I don't know how to incorporate Gallery2 into Flash, and I've been told it doesn't integrate very well. I'm hesitant to use Javascript but I'm willing if it's necessary. I wouldn't mind PHP because most the pages are already PHP, but I don't know enough of the code to know how I could apply it to this situation.

 

I've wracked my brain and tried various different things and my headache is only growing, so I've come here to ask for second opinions.

Link to comment
Share on other sites

I think you should use regular frames, rather than iframes. Then, just target your links from one frame to another. Your frames could look like this:

 

<frameset rows="300,*">

  <frame name="top" src="top.htm">

  <frameset cols="50%,50%">

      <frame name="left" src="left.htm">

      <frame name"right" src="right.htm">

  </frameset>

</frameset>

 

Then just make sure your links target the correct frame with the target="left" tag.

Link to comment
Share on other sites

OK, I need to be sure I understand what you're trying to do. This is what I do understand (I think):

 

You have 3 basic pages. We'll call the first one "main.php." Main.php has two iframes, containing "left.php" and "right.php."

 

When someone clicks a link in right.php, you want it to target left.php? And you already have names and targets set up and it's not working?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.