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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape Scrollbar Problem

Status
Not open for further replies.

aleci

Programmer
May 22, 2001
40
GB
Hi all,
Hopefully someone can help me with a seemingly simple problem.
I have created a popup window using the following script:

function topWindow5(){
popup = window.open("about.htm","","height=450,width=600,scrollbars=yes screenX=50,screenY=100,top=30,left=50");

Scrollbars clearly set to YES. And all works well in IE5.x
But when I come to view the same popup in NN6.2 : No scrollbars at all.
Has anybody experienced a similar problem?
ANY ideas greatly appreciated!
thanks in advance
 
Yes, I have. In netscape, the scrollbars are excluded if the document is not scrollable. So what I do is make sure that it is scrollable by placing an empty table at the bottom of the page, or an additional row if I'm already using a table, with just enough height to force the document to scroll.

ToddWW
 
Your notation is wrong, use the following

window.open("about.htm","","height=450,width=600,scrollbars,screenX=50,screenY=100,top=30,left=50");

You do not need to write the '=yes' bit
 
Aleci,

scrollbars=yes works fine if that's the syntax you prefer and will force scrollbars in both browsers as long as the document is scrollable. scrollbars and scrollbars=yes both evaluate to true so it's your preference.

If the document is scrollable, both IE and netscape will behave identically.

However, if your document is not scrollable, IE will place a disabled scrollbar in the window and Netscape will leave out the scrollbar entirely. Regardless of what you put in your window parms.

That's why I always force my documents to be scrollable. That way, I'm dealing with the same screen size in both IE and NS no matter what.

ToddWW
 
ToddWW and aleci, TodWW you are right about the scrollbars=yes statement however you should note that Netscape is sometimes unforgiving on syntax, the following statement will not give scrollbars:

popup = window.open("about.htm","","height=450,width=600,scrollbars=yes screenX=50,screenY=100,top=30,left=50");
as there is no comma after the =yes

this too will not give scrollbars:

popup = window.open("about.htm","","height=450,width=600,scrollbars=yes , screenX=50,screenY=100,top=30,left=50");
as there is a space after the =yes

Correct formatting is essential


 
Thank you both for your help, and youre both absolutely correct.
Everything is working as it should now.
I was missing the comma and got punished for it :)
I am new to JS and new to Netscape so this has been a valuable lesson.
Thank you both once again !
 
sjravee, you're right,
i've noticed that netscape needs preferences to be passed separated by "," but not " ," or ", " too Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top