Using a DIV as an IFrame.

Support, Discussion, Reviews
Post Reply
User avatar
Akaran_D
Way too much time!
Way too much time!
Posts: 4151
Joined: July 3, 2002, 2:38 pm
Location: Somewhere in my head...
Contact:

Using a DIV as an IFrame.

Post by Akaran_D »

Is it possible?
Say I have a menu, nestled intoa graphic nestled into a table. Now, on this menu, I want to click somthing and have it open up in a DIV for the main content lower down on the page.

Is this possible, or do I need to bite the bullet and sweat out IFrames?
Akaran of Mistmoore, formerly Akaran of Veeshan
I know I'm good at what I do, but I know I'm not the best.
But I guess that on the other hand, I could be like the rest.
User avatar
archeiron
Way too much time!
Way too much time!
Posts: 1289
Joined: April 14, 2003, 5:39 am

Re: Using a DIV as an IFrame.

Post by archeiron »

Akaran_D wrote:Is it possible?
Say I have a menu, nestled intoa graphic nestled into a table. Now, on this menu, I want to click somthing and have it open up in a DIV for the main content lower down on the page.

Is this possible, or do I need to bite the bullet and sweat out IFrames?
Please explain your question more clearly, but the answer is almost certainly yes. I just need to understand better what the fuck you are saying so that I can provide you with an example. ;)
[65 Storm Warden] Archeiron Leafstalker (Wood Elf) <Sovereign>RETIRED
User avatar
Xatrei
Way too much time!
Way too much time!
Posts: 2104
Joined: July 22, 2002, 4:28 pm
Gender: Male
Location: Boringham, AL

Post by Xatrei »

Is this the sort of effect you're looking to use (the scrolling section containing the "meat" of the document)?

http://www.csszengarden.com/?cssfile=047%2F047%2Ecss

The DIV that contains the scrolling bit ("supportingText") is constrained to an area 375 pixels wide by 150 pixels high, and allowed to produce a scrollbar rather than being clipped with the following bit of CSS:

Code: Select all

#supportingText { 
	width: 375px;
	height: 150px;
	overflow: auto;
	padding: 0 20px 30px 5px;
	z-index: 10;
	border-left: solid 1px #999;
What I think you're asking is for a way to fill such an area with content when the user chooses a particular item on a menu. You could certainly do this by placing the different content into spearate DIVs and using a bit of javascript to toggle the various DIV's visibility property. For what you're looking to do, however, it sounds like you'll be better off using teh evil frames of doom.

A good, yet somewhat complicated, example of this sort of effect is a in the AA, Keys, Flags Skills, etc. buttons of a Magelo profile. Clicking on any of those links will fire a javascript event handler that toggles off the current DIV and toggles on the chosen DIV. The same sort of thing happens when you click an item icon within a profile to open the item detail box.
"When I was a kid, my father told me, 'Never hit anyone in anger, unless you're absolutely sure you can get away with it.'" - Russel Ziskey
User avatar
Akaran_D
Way too much time!
Way too much time!
Posts: 4151
Joined: July 3, 2002, 2:38 pm
Location: Somewhere in my head...
Contact:

Post by Akaran_D »

Thanks Xag, that answers my question. :)
Akaran of Mistmoore, formerly Akaran of Veeshan
I know I'm good at what I do, but I know I'm not the best.
But I guess that on the other hand, I could be like the rest.
Post Reply