473,761 Members | 8,651 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to bring Calendar control from back to front using javascript

11 New Member
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="#D DDFE7" bgcolor="#56565 6"cellPaddin g=0 cellSpacing="1" id=calendar style="DISPLAY: none; POSITION:absolu te; z-index:4;" >
<TBODY>
<TR>

<TD Align="left" colspan="7">
<!-- Month combo box -->
<SELECT id=month class=sbox onchange=newCal endar()>
<SCRIPT language=JavaSc ript>
// 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=newCal endar()>
<SCRIPT language=JavaSc ript>
// 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=JavaSc ript>
// Output days.
for (var intLoop = 0; intLoop < days.length; intLoop++)
document.write( "<TD>" + days[intLoop] + "</TD>");
</SCRIPT>
</TR>


<TBODY class=dates id=dayList onclick="getDat e('')" Align=center >
<!-- Generate grid for individual days. -->
<SCRIPT language=JavaSc ript>
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=getToda yDay()></TD>
<TD align=right colSpan=2><A href="javascrip t:HideCalendar( );"><SPAN class="content" ><B>
Hide</B></SPAN></A></TD>
</TR>
</TBODY>
</table>[/HTML]
Attached Images
File Type: jpg prob.jpg (38.7 KB, 484 views)
Sep 4 '07 #1
11 4484
dmjpro
2,476 Top Contributor
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 New Member
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 Top Contributor
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 Recognized Expert Moderator MVP
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 Recognized Expert Moderator MVP
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 New Member
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 Top Contributor
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 New Member
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 Recognized Expert Moderator MVP
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

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

Similar topics

5
4319
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 control then is invisible. How do I make the calendar control pop up over other control in a asp.net c# environment? Charles
5
1386
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 calendar and then close the calendar window. So basically I want to customize the <A> tag for each date to call my custom JavaScript function. function SelectedDate(strDate) { window.opener.document.forms.elements.value =
7
11093
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? Thanks in advance.
0
1746
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 controls (i.e. roundedcorners component www.4guysfromrolla.com], buttons and panels) functions like a tab control. The buttons are programmatically designed to make the corresponding panel visible. Sample aspx.vb code:
2
3415
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 controls (i.e. roundedcorners component www.4guysfromrolla.com], buttons and panels) functions like a tab control. The buttons are programmatically designed to make the corresponding panel visible. Sample aspx.vb code:
4
2325
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 a date and date is very well dropped in text box and inserted in DB. But if user is clicking on image button, calendar is opening. If he is not selecting any date and wants that calendar window should close, its not happening. Even if he clicks...
3
2634
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" runat="server" EnablePartialRendering="true"/> <atlas:UpdatePanel runat="server" ID="UpdatePanel1" Mode="Conditional"> <ContentTemplate> After inserting this code, my calendar stopped working in that if I clicked on a date, nothing would...
7
2371
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 version of the application. The javascript version worked nicely -- you click on a calendar.gif in an anchor next to a textbox. The calender would pop up in a new window, you select the date, the calendar window would close and the textbox would be...
4
3219
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 javascript in mozilla , i couldnt able to scroll through the month , why so . ? Want to display , data's from the table on the respective date in that control.. . CREATE TABLE .( IDENTITY(1,1) NOT NULL, (100) NULL, NULL, ...
0
9531
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10115
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9957
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9775
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7332
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.