I have a webpage which adds a floating iframe to the body. I have a javascript function:
function jettison(){
var string = prompt('Enter frame name:');
var newIframe = document.createElement('iframe');
newIframe.setProperty('src','http://www.blackle.com');
newIframe.setProperty('seamless','seamless');
newIframe.setProperty('id',string);
newIframe.setProperty('unselectable','on');
newIframe.setProperty('onmousedown','updatePos(event,this)');
newIframe.setProperty('onmouseout','movePos(event); hide();');
newIframe.setProperty('onmousemove','movePos(event)');
newIframe.setProperty('onmouseover','show()');
newIframe.setProperty('onmouseup','stopPos()');
newIframe.setProperty('style','position:absolute; left:250px; width:500px; height:500px; top:250px; border:25px black solid;-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none;user-select: none;');
document.body.appendChild(newIframe);
alert('Got to end!!!!!!!!!!!!!!!!!!!!!');
}
I call the function using a button, and I see the name prompt. I enter in a value, and press OK. However, the Got to end! alert box never appears.
What is happening that causes Javascript to never get to the end of the function?
P.S. You can see my page and source at : http://www.jettison.tk/tests/test3.html
function jettison(){
var string = prompt('Enter frame name:');
var newIframe = document.createElement('iframe');
newIframe.setProperty('src','http://www.blackle.com');
newIframe.setProperty('seamless','seamless');
newIframe.setProperty('id',string);
newIframe.setProperty('unselectable','on');
newIframe.setProperty('onmousedown','updatePos(event,this)');
newIframe.setProperty('onmouseout','movePos(event); hide();');
newIframe.setProperty('onmousemove','movePos(event)');
newIframe.setProperty('onmouseover','show()');
newIframe.setProperty('onmouseup','stopPos()');
newIframe.setProperty('style','position:absolute; left:250px; width:500px; height:500px; top:250px; border:25px black solid;-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none;user-select: none;');
document.body.appendChild(newIframe);
alert('Got to end!!!!!!!!!!!!!!!!!!!!!');
}
I call the function using a button, and I see the name prompt. I enter in a value, and press OK. However, the Got to end! alert box never appears.
What is happening that causes Javascript to never get to the end of the function?
P.S. You can see my page and source at : http://www.jettison.tk/tests/test3.html