Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IFRAME or same function

Status
Not open for further replies.

jackyl

Programmer
Oct 23, 2001
44
CA
Is there a way to make an inline frame (or equivalent) in Netscape?

I have a text block that I am wanting to have scroll, but the rest of the page does not have to scroll. What is the best way to do this? (I really don't want to make the messy frame structure that it would need, but will if I have to)

 
Hi,

Netscape likes to do things differently. Instead of using an IFRAME Netscape uses the ILAYER. Both are exactly the same concept but only Netscape uses ILAYER and MSIE only uses IFRAME.

You will have to use some kind of browser detection script using JS or SSI to detect which browser a user is using then show the appropriate tag according to the browser.

Hope this helps! NATE
spyderix.gif

design@spyderix-designz.com
 
You can also acheive your desired effect using CSS (and it will work in both NN and IE!). Simply put the content you want scrolled in between <div> tags, and set the height, width, and overflow for the block.
Here's an example:

///// CSS part ///////
Code:
<style type=&quot;text/css&quot;>
#scrolled { height:400px; width:500px; overflow:scroll;
            border:2px solid #000 }
</style>

//// HTML part //////
<div id=&quot;scrolled&quot;>Your content here</div>

Good Luck! (-: -----------------------
&quot;To the small part of ignorance that we arrange and classify we give the name 'knowledge'&quot; -- Ambrose Bierce
 
Actually, <div> is IE and NS 6+ only. Older NN versions don't support it.

Rick It's a pleasure to know that I've helped you. If I have,
please click the link below to let me know. :)
 
ristmo2001,

That is not true at all. You have to implement a browser compatibility script to get it to work for all browsers. They will work for all browsers, the key is to get NN:4.75 to co-operate with you.
 
I don't know about old NN compatibility, but the div method is still better than using a script to pick between <ilayer> and <iframe>. The reason? Well, if the browser does not support the necessary CSS to make the div block scroll, the worst it can do is spit out the contents without scrolling. If you use the other method and the browser doesn't support javascript (or your javascript just isn't universal enough -- different versions of browsers will respond to different techniques), there is the possiblilty that it won't display anything at all.

Personally, I think content availablity comes before looks. -----------------------
&quot;To the small part of ignorance that we arrange and classify we give the name 'knowledge'&quot; -- Ambrose Bierce
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top