Jump to content

create Element


optikalefx

Recommended Posts

basically im creating a DIV, an INPUT and another DIV all layerd, and they fade onto the screen.

The problem, is that i cant type in the Input field after its been placed.  even tho it shows up and the cursor changes

function makeLink() {

var w = 292;
var h = 123;
var j = 0;
var z;
var int1;
var int2;
var editDoc = document;
var y = editDoc.getElementsByTagName("BODY")[0];
var z = y.parentNode;

lin = editDoc.createElement("DIV");
lin.style.width = w;
lin.style.height = h;
lin.style.opacity = 0;
lin.style.backgroundImage = "url(chrome://test/content/link.png)";
lin.style.zIndex = "99990";
lin.style.position = "absolute";           	   
lin.style.left = Lmousex;
lin.style.top = Lmousey;

lLink = editDoc.createElement("INPUT");
lLink.id = "linkURL";
lLink.size = 28;
lLink.value = "TEXT IN HERE";
lLink.style.border = 0;
lLink.style.opacity = 0;
lLink.style.zIndex = "99992";
lLink.style.position = "absolute";
lLink.style.left = Lmousex + 30;
lLink.style.top = Lmousey + 38;


l_btn = editDoc.createElement("DIV");
l_btn.style.width = 78;
l_btn.style.height = 20;
l_btn.style.zIndex = "99993";
l_btn.style.opacity = 0;
   l_btn.style.position = "absolute";
l_btn.style.left = Lmousex + 186;
l_btn.style.top = Lmousey + 82;
l_btn.addEventListener('click', setLink , true);


z.insertBefore(lin, y);
z.insertBefore(lLink,y);
z.insertBefore(l_btn,y);

int1 = setInterval('fadeBox()', 20);

}

 

Link to comment
https://forums.phpfreaks.com/topic/94278-create-element/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.