OZONE Asylum
Forums
DHTML/Javascript
createElement("div") + IE?
This page's ID:
27802
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
In regards to the following code, is it normal that IE doesnt support this feature, or am I simply doing something wrong? This code works in Firefox. Am I forced to make a second version which writes elements using innerHTML ? [code] divHandler = createDiv("corner4",10,30,30,30,null,null,50); document.body.appendChild(divHandler); function createDiv(name,left,top,width,height,background,onmouseup,zIndex) { divHandle = document.createElement("div"); divHandle.style.position = "absolute"; divHandle.style.top = top + "px"; divHandle.style.left = left + "px"; divHandle.style.width = width + "px"; divHandle.style.height = height + "px"; if(zIndex) divHandle.style.zIndex = zIndex; if(background) divHandle.style.background = background; if(onmouseup) divHandle.style.onmouseup = onmouseup; return divHandle; } [/code]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »