/    Sign up×
Community /Pin to ProfileBookmark

How to remove scrollbar

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

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@PittimannDec 04.2003 — 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...
×

Success!

Help @ntcmlee spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.22,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...