473,403 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

How to bring Calendar control from back to front using javascript

11
hi dear all
please help me
im using the calander control from a form
just i paste here the problem,
the problem is when i click the calander button the calander is opening at the same time backside form component also visible in front side how can i rectfiy this one? i changed the z-index also but no use?

[HTML]<TABLE border="1" bordercolor="#DDDFE7" bgcolor="#565656"cellPadding=0 cellSpacing="1" id=calendar style="DISPLAY:none; POSITION:absolute; z-index:4;" >
<TBODY>
<TR>

<TD Align="left" colspan="7">
<!-- Month combo box -->
<SELECT id=month class=sbox onchange=newCalendar()>
<SCRIPT language=JavaScript>
// Output months into the document.
// Select current month.
for (var intLoop = 0; intLoop < months.length; intLoop++)
document.write("<OPTION " + (today.month == intLoop ? "Selected" : "") + ">" + months[intLoop]);
</SCRIPT>
</SELECT>

<!-- Year combo box -->
<SELECT id=year class=sbox onchange=newCalendar()>
<SCRIPT language=JavaScript>
// Output years into the document.
// Select current year.
for (var intLoop = 1900; intLoop < 2028; intLoop++)
document.write("<OPTION " + (today.year == intLoop ? "Selected" : "") + ">" + intLoop);
</SCRIPT>
</SELECT>


</TD>
</TR>
<TR class=days align="center" >
<!-- Generate column for each day. -->
<SCRIPT language=JavaScript>
// Output days.
for (var intLoop = 0; intLoop < days.length; intLoop++)
document.write("<TD>" + days[intLoop] + "</TD>");
</SCRIPT>
</TR>


<TBODY class=dates id=dayList onclick="getDate('')" Align=center >
<!-- Generate grid for individual days. -->
<SCRIPT language=JavaScript>
for (var intWeeks = 0; intWeeks < 6; intWeeks++)
{
document.write("<TR>");
for (var intDays = 0; intDays < days.length; intDays++)
document.write("<TD></TD>");
document.write("</TR>");
}
</SCRIPT>

<!-- Generate today day. --></TBODY>
<TBODY>
<TR >
<TD class=today colSpan=5 id=todayday onclick=getTodayDay()></TD>
<TD align=right colSpan=2><A href="javascript:HideCalendar();"><SPAN class="content"><B>
Hide</B></SPAN></A></TD>
</TR>
</TBODY>
</table>[/HTML]
Attached Images
File Type: jpg prob.jpg (38.7 KB, 480 views)
Sep 4 '07 #1
11 4420
dmjpro
2,476 2GB
Welcome to TSDN.

Don't do double Post.
And try to follow the Post Guidelines while you do Post.

Kind regards,
Dmjpro.
Sep 4 '07 #2
gan
11
Welcome to TSDN.

Don't do double Post.
And try to follow the Post Guidelines while you do Post.

Kind regards,
Dmjpro.
ok thanks for ur advise
Sep 4 '07 #3
dmjpro
2,476 2GB
ok thanks for ur advise
You better to use DIV instead of table here.
Try this one and see what happens.

Kind regards,
Dmjpro.
Sep 4 '07 #4
acoder
16,027 Expert Mod 8TB
Removed the duplicate thread. If you needed to add more information as you did in this thread, just post in the same thread or edit the original post (you can edit up to an hour after posting).

I've added CODE tags for you. Please use them when posting code. See the Reply Guidelines on the right next time you reply. Thanks!

MODERATOR
Sep 4 '07 #5
acoder
16,027 Expert Mod 8TB
hi dear all
please help me
im using the calander control from a form
just i paste here the problem,
the problem is when i click the calander button the calander is opening at the same time backside form component also visible in front side how can i rectfiy this one? i changed the z-index also but no use?
There is nothing wrong with your code (in terms of bringing the calendar forward). You're experiencing a bug in IE6. Check in Firefox, Opera or other browsers and you won't see this. In IE6, select dropdowns appear in front of floating divs. There are two possible solutions:
  1. Hide the select elements when you display the calendar. This is the easy solution.
  2. And the more elegant solution: use the iframe shimming technique. Google it!
Sep 4 '07 #6
gan
11
You better to use DIV instead of table here.
Try this one and see what happens.

Kind regards,
Dmjpro.
thanks for your suggestion
but here im using only table na
Sep 4 '07 #7
dmjpro
2,476 2GB
thanks for your suggestion
but here im using only table na
Is this a Chat Window?
You are using Code Words.

Kind regards,
Dmjpro.
Sep 4 '07 #8
gan
11
There is nothing wrong with your code (in terms of bringing the calendar forward). You're experiencing a bug in IE6. Check in Firefox, Opera or other browsers and you won't see this. In IE6, select dropdowns appear in front of floating divs. There are two possible solutions:
  1. Hide the select elements when you display the calendar. This is the easy solution.
  2. And the more elegant solution: use the iframe shimming technique. Google it!
Thanks for your kind help,can you give me the modified cods please?
otherwise tell me how can i Hide the elements when i display the calendar. please give me that solution

thanks
Sep 4 '07 #9
acoder
16,027 Expert Mod 8TB
Thanks for your kind help,can you give me the modified cods please?
otherwise tell me how can i Hide the elements when i display the calendar. please give me that solution
In the code which displays the calendar, access the select elements which overlap and set the visibility property to "hidden", e.g.
Expand|Select|Wrap|Line Numbers
  1. var selObj = document.getElementById("selObjID");
  2. selObj.style.visibility = "hidden";
Don't forget to display the select elements again when you hide the calendar (set the visibility property to "visible").
Sep 4 '07 #10
gan
11
In the code which displays the calendar, access the select elements which overlap and set the visibility property to "hidden", e.g.
Expand|Select|Wrap|Line Numbers
  1. var selObj = document.getElementById("selObjID");
  2. selObj.style.visibility = "hidden";
Don't forget to display the select elements again when you hide the calendar (set the visibility property to "visible").
Thank you so much i got the solution with your gideline
thanks lots

bye
Sep 5 '07 #11
acoder
16,027 Expert Mod 8TB
Glad you got it working. Post again anytime if you need help.
Sep 5 '07 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Charles | last post by:
Hello, I would like for my users to have a calendar control only when needed. IE button click for the control to appear and then once the date is selected. Populate a text box and the calendar...
5
by: Merex | last post by:
Hello all, I want to use the Calendar control as a popup window. I would like each day's link to execute some javascript which would set the value of a textbox on the window which opened the...
7
by: tom | last post by:
Hi, I want a listbox below a hidden calendar control. The problem is that the listbox will shadow the calendar when the calendar is visible. How can I bring the calendar from back to front? ...
0
by: maxrawson | last post by:
First, let me start by saying my asp.net experience is still in it's infancy so please bare with me as I try to explain my situation. I have created a single page that with the use of many...
2
by: Caesar Augustus | last post by:
First, let me start by saying my asp.net experience is still in it's infancy so please bare with me as I try to explain my situation. I have created a single page that with the use of many...
4
by: raghav | last post by:
Hi Friends I am having very small issue. I am using calendar control which is available in .net 2005 to display date. When a user clicks on image button, calendar is opening very well. He selects...
3
by: =?Utf-8?B?UGFycm90?= | last post by:
I applied the following Ajax code in my web page which has a calendar control to keep my page from completely reloading everytime something was changed. <atlas:ScriptManager ID="ScriptManager1"...
7
by: John Kotuby | last post by:
Hi all, I am trying to use a calendar server control which I have ID="Calendar1" in the source code. What I am trying to do is emulate a JavaScript calendar that was being used in an older ASP...
4
by: sureshl | last post by:
Hi, i dunno how to use calendar control . i need to bring data to the calendar on the respective date , whether calendar control will work both server side and client side. coz if i disable the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.