optikalefx Posted March 4, 2008 Share Posted March 4, 2008 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); } Quote Link to comment Share on other sites More sharing options...
haku Posted March 4, 2008 Share Posted March 4, 2008 I don't really know for sure, but what doctype are you using? Quote Link to comment Share on other sites More sharing options...
optikalefx Posted March 4, 2008 Author Share Posted March 4, 2008 its an external js file, so whatever doctype is on the page i load the script onto Quote Link to comment Share on other sites More sharing options...
haku Posted March 4, 2008 Share Posted March 4, 2008 That doesn't really answer the question does it. Quote Link to comment Share on other sites More sharing options...
optikalefx Posted March 4, 2008 Author Share Posted March 4, 2008 sorry i mean to spell it out, theres no way of knowing the doc type. we can assume <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Quote Link to comment Share on other sites More sharing options...
haku Posted March 4, 2008 Share Posted March 4, 2008 If so, then you need to use small letters for your element names (capital letters are invalid). I doubt that will fix your problem, but it may. Quote Link to comment Share on other sites More sharing options...
optikalefx Posted March 5, 2008 Author Share Posted March 5, 2008 nah, thats actually not true. I have my javascript error console on strict and no errors or warnings come up for capital letters. Quote Link to comment Share on other sites More sharing options...
haku Posted March 5, 2008 Share Posted March 5, 2008 Its not a javascript error, its an xhtml error. Capital letters are invalid in xhtml. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.