Forum Moderators: mack

Message Too Old, No Replies

Persistant Iframe or something

I dont want to resort to frames

         

Backlash

6:12 am on Nov 10, 2003 (gmt 0)

10+ Year Member



This is a tricky one to explain.
First off; I dont want to resort to a frameset because of messing around with engine results and bookmarking nightmares.

I have a page that contains "content" and a page that has an expandable "menu" controlled by a slick javascript function.

What i'd like to have happen is the main content would show up in the parent window (so that the page is at least bookmarkable), and have the menu appear in a persistent iframe or object or layer or whatever would work so that it appears like its a frame in a frameset but its not...
I'm not really sure how to explain it..

I currently have the menu appear in an Iframe but as soon as another link is clicked. the menu appears to expand just before the new page loads but then because the iframe is not persistent, the newpage loads a new iframe with the menu in its native state (collapsed). The problem is then that the user cannot access the second level links :S

Its probably something so stupidly obvious... like imbedding a reference link into the menu DIV definition. But its late and I'm stupid because its late...

HELP PLEASE! :D

JamesR

11:40 pm on Nov 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi backlash, welcome to WebmasterWorld!

It is hard to understand your situation, let alone solve it. I am not real familiar with iFrames but maybe someone else around here has faced a similar issue...?

Backlash

2:31 am on Nov 11, 2003 (gmt 0)

10+ Year Member



Yeah, I find it hard to explain to people who are actually looking at the computer screen too.

Lets just make it simple.

Is there a way to display 2 independent html pages at the same time without resorting to a frameset?

I've discussed it with a few friends and SSI came up but every resource I've come across for help has been sketchy at best. I'm not even sure that would work.

...2 hours of thought later and forgetting to submit the reply...

I think I may be able to get it to work by referencing the javascript menu from the parent page and forcing it to expand the relevant tree... if that made any sense (my brain hurts)

--Reminders--
-Press Submit
-Go to sleep

encyclo

1:06 pm on Nov 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



SSI is the way to go: it's very easy and will put your menu on each page. Just place the menu markup in a separate file called, say, menu.inc (just the menu, mind, no other markup such as headers or such). Then you reference the menu file in your main content page with this:

<!--#include virtual="menu.inc" -->

At the spot in your page where you want the menu to appear.

Make sure that your content file is parsed for SSI - it usually is if it has an .shtml extension.