Hey guys,
I've got a script that is supposed to dim the entire page, which it does, but I have problems removing it... How can I remove this?
Code:
<a onclick="javascript:
var dimmer = document.createElement('div');
var divIdName = 'testDiv';
dimmer.setAttribute('id',divIdName);
dimmer.style.border = '10px solid #000000';
dimmer.style.height = '100%';
dimmer.style.width = '99%';
dimmer.style.left = '0%';
dimmer.style.top = '0%';
dimmer.style.overflow = 'hidden';
dimmer.style.position = 'absolute';
dimmer.style.background = '#000000';
dimmer.style.opacity = '0.5';
dimmer.innerHTML = 'HSAJFHSKJAFHSDAF';
dimmer.style.color = '#ffffff';
document.body.appendChild(dimmer);
document.body.style.overflow = 'hidden';
">Dim the lights!</a>
I've tried replacing the HFLAHJFLKAHFHAHJFD with a code with removeChild in it, but that doesn't work...
Any ideas? Thanks
~PG
Also don't yell at me because I have an onclick on an a... I was just lazy, I'll change it when it works 
Last edited by Physicsguy; 06-06-2010 at 03:06 PM..
|