Forum Moderators: not2easy

Message Too Old, No Replies

Mimicing frames with CSS?

         

Don_Hoagie

4:08 am on Aug 11, 2005 (gmt 0)

10+ Year Member



Glad to be aboard folks... and what better way for a newbie to introduce himself than to beg for help? Ah well, at least I searched the forum before posting. Incidentally, I suppose this could fall under server side stuff, so if any mod wants to move it, i have no objection.

So here's what I can't figure out (would've attached a layout pic but I don't see that as a post option):

I have a CSS layout, basically two 400x300 columns adjacent to eachother. This is for a site that will be pulling inventory from a database. The idea is that the left "box" contains the pulled inventory list, and then when you select one of the items, its details populate in the box at right.

Now, how will that occur without having to reload the whole page, which among other annoyances, would re-pull the inventory? In effect, I would want it to work like the HTML frames of old, except hopefully not nearly as ugly. I want the inventory list to stay put once it's pulled for the first time, allowing people to clickety click any item they want and have it populate in the other box without page reload.

At any rate, replies or no replies, it's good to be here. Thanks for reading.

tedster

7:26 am on Aug 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could use iframes (inline frames) and only the one that was populating would need to reload. That's probably the most straightforward and cross-browser approach you could use.

Mimicking frames with CSS can be a complex thing, depending on the browser support you want. Here's a thread with one CSS approach for emulating frames:

[webmasterworld.com...]

Don_Hoagie

11:29 am on Aug 11, 2005 (gmt 0)

10+ Year Member



Thanks very much tedster... yeah, I actually saw that thread when I searched... looked a little heavy with code and spotty for browser support, so I was hoping there was another way.

Don't know jack about i-frames, so I guess I should check that out. Thank you sir

hexdj

11:44 am on Aug 11, 2005 (gmt 0)

10+ Year Member



I have been trying to do the same as Don_hoagie with pure CSS and iFrames but it didn't seem as the best solution to me and someone mentioned I should use PHP and that's what I have been doing now, just use include ("whatever.html"). I am not sure if this works for you.

iFrames on the other hand are very easy to use, if you don't wanna get into the PHP thing...

<iframe id="navMenu" src="menu.html">
</iframe>

that's basically all you would need to make an iFrame.