/    Sign up×
Community /Pin to ProfileBookmark

Owerflow: visible problem in IE

Hello!

I need som serious help with our old beloved friend Internet Explorer.

I have this css popup and when it pops up on a button click I want the scroll function to disapear, and I understand this is done most easily with owerflow.

So when it pops up I want to disable the scroll function, but when you close the popup I want it to allow scrolling again, and I’ve done this woth this code:

[CODE]function closeAd() {
document.body.style.overflow = ‘visible’;
document.getElementById(“popad”).style.display=”none”;
}
function openAd() {
document.getElementById(“popad”).style.display=”block”;
document.body.style.overflow = ‘hidden’;
}[/CODE]

So that works well in FF (of course) but in IE the scroll won’t come back ?

Any ideas?

Thnx!

//Tovedal

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@WebnerdJan 24.2010 — change

document.body.style.overflow = 'visible';

to

document.body.style.overflow = 'auto';
Copy linkTweet thisAlerts:
@TovedalauthorJan 24.2010 — Magical, thank you sir!
×

Success!

Help @Tovedal 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.26,
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,
)...