This question already has an answer here:
Can malware be installed without permission (a drive-by download) if a pop-up ad is closed within a second of it opening?
More specifically, can it be installed after the ad is closed, not during the one second that it was open?
Note: I had just Microsoft Security Essentials running for protection at the time. which is useless