Click here to Skip to main content
15,920,383 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all
I have an Object in my page. I want locate a div on that, This work in Firefox and Chrom but not in ie.

Asp's Menu can locate on this object but other html elements cant't be place on that
so I Want a good solution for that.

Example :

XML
<HTML>
<HEAD>
<TITLE>Z-Index</TITLE>
<script>
function setindex()
{
    div1.style.zIndex=text1.value;
    select1.style.zIndex=text2.value;
    getindexes();
}

function getindexes(){

    text1.value=div1.style.zIndex;
    text2.value=select1.style.zIndex;
    text3.value=5;
}
</script>
</HEAD>
<BODY onload="getindexes()">

Div
<input type="text" value="" id=text1 name=text1 ><p>

Select
<input type="text" value="" id=text2 name=text2><p>

IFrame
<input type="text" value="" id=text3 name=text3><p>
<input type="button" value="Set Z-Index" id=button1 name=button1 onclick="setindex()">
<DIV id=div1 name=div1  style="width:200;height:200;background-color:lightblue;
position:absolute;left:350;top:250;z-index:">DIV</DIV>
<select id=select1 name=select1 style=";position:absolute;left:300;top:400;width=300;z-index:"
size=1 >
    <option>Option1
    <option>Option2
    <option>Option3
</select>
<object id="iframe1 " type="text/html" style="width:100;height:115;position:absolute;
left:400;top:300;border-color:green;z-index:5">
</object>
</BODY>
</HTML>



Please Help me
Thanks
Posted

1 solution

You should give jQuery [^] a try; it will encapsulate the different DOM into one API.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900