Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

z-index - Calendar

Status
Not open for further replies.

sipps

Technical User
Feb 9, 2003
133
0
0
GB
Hi all,

I am using a popup calendar to input a date value into my form. It's a great calendar, but I can't get it to appear above the form objects on the page, i.e. other drop down boxes behind the claendar appear in front of it!

The calendar is written in a js file and uses a css file.
I put z-index: 65535; in the class it calls, but this seems to have no effect on where the div appears.

Does anyone know if the z value should be placed eleswhere either in the css file or js file?

Thanks
 
sipps:

This behavior you are experiencing is by default. No where on the web have I found a popup object to appear "in-front" of select lists. The only way around this is to re-arrange your page.

I hope this helps,
[yinyang]
Patrick
 

is one site which shows the calendar above the form, and this is where I saw that the z-index was set to 65535 and I wondered how I could incorporate this into my script.

Thanks
 
sipps:

The z-index should be placed on the div tag that display's the calendar.

Thanks,
[yinyang]
Patrick
 
I have put it into two places to test whether or not it makes a difference:

function dynCalendar_writeHTML()
{
if (is_ie5up || is_nav6up || is_gecko) {
document.write('<a href=&quot;javascript: ' + this.objName + '.show()&quot;><img src=&quot;' + this.imagesPath + 'dynCalendar.gif&quot; border=&quot;0&quot; width=&quot;16&quot; height=&quot;16&quot; /></a>');
document.write('<div class=&quot;dynCalendar&quot; id=&quot;' + this.layerID + '&quot; onmouseover=&quot;' + this.objName + '._mouseover(true)&quot; onmouseout=&quot;' + this.objName + '._mouseover(false)&quot;></div>');
}
}
This code calls writes the calendar, and as you can see it uses a css file, and this is where I put the z-index:

.dynCalendar {
background-color: #20C2DF;
border: 2px outset white;
visibility: hidden;
position: absolute;
top: 1px;
left: 1px;
z-index: 65535;
}

This seemed to make no difference! I am not sure if this is the right thing to put, or if it is the right place?

Thanks Patrick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top