473,405 Members | 2,141 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,405 software developers and data experts.

Script works in IE7 NOT in IE6

I have a javascript to a calendar popup. It is linked in the head tag like this:
[HTML]<script src="CalendarPopup.js" type="text/javascript"></script>[/HTML]

It works fine in both IE 6 and IE 7 locally, but as soon as I upload it to my domino server the problems start. In IE 7 it works fine, but in IE 6 it doesn't seem to load as I get a client-side error saying my calendar instance is undefined, hence it doesn't "see" the content of the javascript file. The script file is about 37kb i size.

Anyone have any ideas?

Regards,
Vetle
Oct 16 '07 #1
15 3268
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

Can you give a link to a test page or post some relevant code where the error occurs?
Oct 16 '07 #2
Welcome to TSDN!

Can you give a link to a test page or post some relevant code where the error occurs?
I'm not able to give you a link as it is on our local network. This is the code in the the html page:

[HTML]<head>
<script src="CalendarPopup.js" type="text/javascript"></script>
</head>
<body>
<script language="JavaScript" id="jscal">
var cal = new CalendarPopup("caldiv");
</script>

<input type="text" name="date">

<a href="#" onClick="cal.select(document.forms[0].date,'anchor','dd/MM/yyyy'); return false;" title="cal.select(document.forms[0].date,'anchor','MM/dd/yyyy'); return false;" name="anchor" id="anchor"><img src="calendar.gif" border="0"></a>

<div id="caldiv" style="position:absolute;visibility:hidden;backgro und-color:white;layer-background-color:white;"></div>
</body>[/HTML]

When I load my html page in IE 6 I get an error on my status bar saying "CalendarPopup is undefined". In IE 7 it runs without problems.

Regards,
Vetle
Oct 17 '07 #3
acoder
16,027 Expert Mod 8TB
I'm assuming the error occurs on line 6 in your code shown here.

Is this a freely available calendar script or did you write it yourself?
Oct 17 '07 #4
Yes, on line 6.

I did not write it myself. It's a freely available calendar script.

Vetle
Oct 18 '07 #5
acoder
16,027 Expert Mod 8TB
I did not write it myself. It's a freely available calendar script.
Which one?
Oct 18 '07 #6
acoder
16,027 Expert Mod 8TB
I think you may need to put the input element within form tags.
Oct 18 '07 #8
I think you may need to put the input element within form tags.
Thank you so much for your contribution Acoder.

It turned out to be an encoding issue that IE 7 could handle but earlier versions could not.

Regards,
Vetle
Oct 18 '07 #9
acoder
16,027 Expert Mod 8TB
You're welcome. Post again if you have any more questions.
Oct 18 '07 #10
vinodV
4
Hi acoder,

There's this 1 problem I'm having with my javascript calendar which pops up underneath drop-down boxes, if there are any where the calendar pops up and this issue however only happens with IE6. Can you please provide any help that would help me solve this problem. And as before I didn't write the code for the popcalendar.js file that does this. I'll find out which file it is I use and post it here. This is the calendar I use,

http://www.koders.com/javascript/fid...203164B37.aspx

except for line 105 in that link, which I've commented out.

Thanks very much,
Oct 26 '07 #11
acoder
16,027 Expert Mod 8TB
I recognise the problem. In IE6, all windowed controls (such as select boxes) appear above DHTML layers/divs.

To combat this problem, you have two options. The easy solution is to hide the select box when the calendar is displayed.

The more difficult but better solution is to use what's known as iframe shimming. Google for "iframe shim" and you should find some code that you could use.
Oct 26 '07 #12
vinodV
4
I recognise the problem. In IE6, all windowed controls (such as select boxes) appear above DHTML layers/divs.

To combat this problem, you have two options. The easy solution is to hide the select box when the calendar is displayed.

The more difficult but better solution is to use what's known as iframe shimming. Google for "iframe shim" and you should find some code that you could use.
thankyou very much acoder
Oct 26 '07 #13
acoder
16,027 Expert Mod 8TB
thankyou very much acoder
No problem, you're welcome.
Oct 26 '07 #14
Thank you so much for your contribution Acoder.

It turned out to be an encoding issue that IE 7 could handle but earlier versions could not.

Regards,
Vetle

Can you please tell me how do I identify the issue and how to fix it?
I'm having and issue with a script I wrote witch works fine in Gecko browsers and IE7 but not in IE6.
Nov 20 '07 #15
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!
Can you please tell me how do I identify the issue and how to fix it?
I'm having and issue with a script I wrote witch works fine in Gecko browsers and IE7 but not in IE6.
Can you post your code?
Nov 20 '07 #16

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

Similar topics

3
by: jonezy | last post by:
my test server is win2k server, the script works fine, loads the movie, allows user selection etc. however when i access the same script on my remote server none of the requesting files load. the...
7
by: Randell D. | last post by:
Folks, I've found a nice menu piece of javascript that works fine when the code is included entirely inside the html page. However, when I place the javascript code outside, in its own ".js"...
1
by: lendle | last post by:
Hello, I have some javascript on local disk, they work fine on mozilla browsers and event work when I put the html into hta format. However, the code does not work on IE of my computer. I've...
2
by: webbedfeet | last post by:
Hi I hope someone can help me. I have a client side form validation script which works perfectly in IE but clicking "Submit" in Mozilla does nothing - the form won't submit. Is there something I...
3
by: cjl | last post by:
Hey all: Just getting my feet wet with javascript. The following script works fine in Firefox, but won't run in IE. In fact, I've included this script as an external file in the <head> of my...
10
by: lawrence k | last post by:
I've got a script called makeRss.php. It works fine if I try to open it with my browser. It makes an RSS feed for every page on my site. You can see it working here: ...
2
by: ranger7419 | last post by:
I'm trying to figure out why this script will work in IE 6 but not Firefox, and so I need someone here with a far better grasp on javascript to explain this. Basically, I have a page with several...
3
tolkienarda
by: tolkienarda | last post by:
hi all i have a problem i have a script that i got working exactly the way i wanted it. and then i tried to intrigate it into the site and it totaly stopped working. below is the original code ...
10
by: Muir | last post by:
I am needing, and would appreciate expert assistance for a Javascript program that I am using in a Website. The script is a Text and Image Fader, which only works on IE, but what I am trying to do...
13
matheussousuke
by: matheussousuke | last post by:
I have a script that works on FF but doesn't in IE. Hare <html> <head> <STYLE>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
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,...

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.