Scrolling, in a text area within the page, but not the entire page? Possible?

They have: 24 posts

Joined: Oct 2001

I'm not sure how if I'm going to be able to describe it correctly, but say I have a page, and instead of making the entire page scroll, I just want an area within it to scroll (just the area with the text). I think I've seen it before, but I'd like to do it without the use of frames. Possible?

I heard there was something called 'iframes'? Is that just embedding a page within a page? I'm trying to move away from the use of frames, but still be able to keep the scrolling within a page, instead of scrolling the entire page.

DC Domain r5

"What I had, I gave today.
What I saved, I lost forever."

Busy's picture

He has: 6,151 posts

Joined: May 2001

iframes does what your wanting in IE, but not in all other browsers, you can also use dhtml but again not viewable in all browsers, another option is a java applet but this can be bulky and slow loading esp. on such a large scale.

if you do deside to use it, use dhtml option as it works on more browsers than the other options (but not all)

good luck

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

hi dcdomain,

There are a number of ways to accomplish what you asking:

1) use a textarea
if you are unconcerned about text formatting (fonts, headers, etc), you can assign your text to textarea and if it is large enough, scrollbars will be created automatically. Something like:

the content must be assigned to 'myText' or typed here

The onFocus event handler above prevents the user from altering the contents.

2) iframes & ilayers
Both are mutually exclusive; that is, ie ignores the ilayer tags and nn4 ignores the iframe tags. Each has a 'src' property which you can use to load a page. Although I haven't made extensive use of either, iframes are supposed to have all the properties of regular frames, and ilayer works much as the netscape4 'layer' command.

3) dHTML

you would need to create a div/layer (and possibly outer ilayer for NN4) and then assign the content to be written through the appropriate DOM. To make the div scrollable, you will have to create images that when mousedOver alter the divs content so that it appears that content is scrolling.

hope this helps
Vinny

Where the world once stood
the blades of grass cut me still

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.