脚本适用于IE7而不是IE6 [英] Script works in IE7 NOT in IE6
问题描述
我有一个javascript到日历弹出窗口。它在head标签中链接如下:
[HTML]< script src =" CalendarPopup.js" type =" text / javascript">< / script> [/ HTML]
它在本地IE 6和IE 7都可以正常工作,但只要我上传它我的多米诺骨牌服务器问题开始了。在IE 7中它工作正常,但在IE 6中它似乎没有加载,因为我得到一个客户端错误说我的日历实例是未定义的,因此它没有看到 javascript文件的内容。脚本文件大小约为37kb。
任何人都有任何想法吗?
问候,
Vetle
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
推荐答案
欢迎来到TSDN!
您是否可以提供测试页面的链接或发布错误发生的相关代码?
Welcome to TSDN!
Can you give a link to a test page or post some relevant code where the error occurs?
欢迎来到TSDN!
您能给出测试页面的链接或发布错误发生的一些相关代码?
Welcome to TSDN!
Can you give a link to a test page or post some relevant code where the error occurs?
我无法为您提供本地网络上的链接。这是html页面中的代码:
[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 = QUOT; cal.select(document.forms [0] .date,锚, DD / MM / YYYY); return false;标题= QUOT; cal.select(document.forms [0] .date,锚, MM / DD / YYYY); return false;名称= QUOT;锚QUOT; 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]
当我在IE 6中加载我的html页面时,我的状态栏上出现错误,提示CalendarPopup未定义。在IE 7中运行没有问题。
问候,
Vetle
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
我假设错误发生在这里显示的代码的第6行。
这是一个免费提供的日历脚本还是你自己编写的?
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?
这篇关于脚本适用于IE7而不是IE6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!