473,240 Members | 1,632 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,240 software developers and data experts.

code run in IE how it ll for ff(Calender Usercontrol )

Hi all,

i have created a Calender user control which can run only IE.but i want the code for mozila,,,,

the code i placed here....



Expand|Select|Wrap|Line Numbers
  1. /* hides <select> and <applet> objects (for IE only) */
  2. function hideElement( elmID, overDiv )
  3.  
  4. {
  5. if( ie )
  6.  
  7. {
  8. for( i = 0; i < document.all.tags( elmID ).length; i++ )
  9.  
  10. {
  11.  
  12. obj = document.all.tags( elmID )[i];
  13. if( !obj || !obj.offsetParent )
  14.  
  15. {
  16. continue;
  17.  
  18. }
  19.  
  20.  
  21.  
  22. // Find the element's offsetTop and offsetLeft relative to the BODY tag.
  23.  
  24. objLeft = obj.offsetLeft;
  25.  
  26. objTop = obj.offsetTop;
  27.  
  28. objParent = obj.offsetParent;
  29.  
  30.  
  31. while( objParent.tagName.toUpperCase() != "BODY" )
  32.  
  33. {
  34.  
  35. objLeft += objParent.offsetLeft;
  36.  
  37. objTop += objParent.offsetTop;
  38.  
  39. objParent = objParent.offsetParent;
  40.  
  41. }
  42.  
  43.  
  44.  
  45. objHeight = obj.offsetHeight;
  46.  
  47. objWidth = obj.offsetWidth;
  48. if(( overDiv.offsetLeft + overDiv.offsetWidth ) <= objLeft );
  49.  
  50. else if(( overDiv.offsetTop + overDiv.offsetHeight ) <= objTop );
  51. else if( overDiv.offsetTop >= ( objTop + objHeight ));
  52.  
  53. else if( overDiv.offsetLeft >= ( objLeft + objWidth ));
  54.  
  55. else
  56.  
  57. {
  58. obj.style.visibility = "hidden";
  59.  
  60. }
  61.  
  62. }
  63.  
  64. }
  65.  
  66.  
  67. /*
  68.  
  69. * unhides <select> and <applet> objects (for IE only)
  70.  
  71. */
  72. function showElement( elmID )
  73.  
  74. {
  75. if( ie )
  76.  
  77. {
  78. for( i = 0; i < document.all.tags( elmID ).length; i++ )
  79.  
  80. {
  81.  
  82. obj = document.all.tags( elmID )[i];
  83.  
  84.  
  85. if( !obj || !obj.offsetParent )
  86.  
  87. {
  88. continue;
  89.  
  90. }
  91.  
  92.  
  93. obj.style.visibility = "";
  94.  
  95. }
  96.  
  97. }
Help me.....



sunaya..
Jul 28 '08 #1
1 1288
acoder
16,027 Expert Mod 8TB
Use document.getElementById() instead of document.all.

Also, test in a more standards-compliant browser first before finally testing in IE. This will make your code more likely to be cross-browser.
Jul 29 '08 #2

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

Similar topics

8
by: PerryC | last post by:
I want to be able to accomplish this, please help: When click on the DOB field, a ActiveX Calender popup and the user choose a date, the value is automatically refreshed in the DOB field in the...
4
by: Chris | last post by:
Hi, I am trying to create a popup calender so a user can click on a button on the main form, a calender will then popup, the user will select a date and then click ok on the popup. The date will...
0
by: Vishnu | last post by:
In a Windows Application How to display a monthly , weekly calender ( Just like the calender in Outlook or the calender display airline websites) .....Also how will the code know if some month and...
3
by: rg44367 | last post by:
Pls let me know the logic or source code to make calemder.
0
by: kalichakradhar | last post by:
hi all, hi, I am developing a application which would open the shared calender of outlook and read the meeting notices and also modifies the meeting notice from Vb.I am successful in opening the...
2
by: iniyan | last post by:
guys i'm new for asp.i alredy had a calender script and i had atched it at <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <script type="text/javascript"...
7
by: gubbachchi | last post by:
Hi all, In my application I need to display the data fetched from mysql database after the user selects date from javascript calender. I have written the code in which after the user selects the...
1
by: moksha | last post by:
hi friends, In my application i have date field.To enter date i want to calender control. When i keep my cursor on textbox calender should popup and the selected value in calender has to...
1
by: xtremebass | last post by:
Hello Bytes, i have a calender program which is created by using Javascript. when i execute that program using Internet Explorer,it works properly but when i tried in Mozilla firefox it didnt...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.