Javascript DOM

Acer

New Member
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? :confused:

P.S. You can see my page and source at : http://www.jettison.tk/tests/test3.html
 

leroy30

New Member
Don't know if this is the cause but it is throwing a 'startx' is undefined error.

Might need to change 'startx =' to 'var startx ='
 
Top