Click to See Complete Forum and Search --> : How to remove scrollbar


ntcmlee
12-04-2003, 01:17 AM
Dear all,

I write a html code to open the new webpage in the following

<a href="enquiry.htm" onclick="window.open(this.href,'child','scrollbars=auto,menubars=no,toolbars=no,width=600,height=400'); return false;">Enquiry form</a>


and point out the scrollbards=auto in the above code. However, no scrollbar can be seen in the webpage even though the whole content cannot be shown completely. Why? I want to show scrollbar when the content is longer than that on-screen display, and no scrollbar when the content is very short. Please help me to accomplish such demand. Thanks

Regards,
Simon

Pittimann
12-04-2003, 02:06 AM
Hi!

In a frame of a frameset you can set the scrolling to "auto", but this is not an attribute for a window opened with window.open!

You have to put: scrollbars (will have scrollbars) or scrollbars=no (will not have scrollbars).

In the first case (which is the one of your choice), most browsers will only display the scrollbars if necessary (too much content for the size of the window). IE unfortunately shows the "empty" vertical scrollbar allways - also if there is no content in the window at all...

Cheers - Pit

By the way: it is not menubars and toolbars, but menubar and toolbar - it doesn't have in effect in your example but if you WANT to show them, e.g. menubars=yes would fail...