IE没有加载脚本? [英] IE not loading script?
问题描述
我有一个带有onchange的选择 - 它可以在Firefox中找到,但在IE中
6我收到一个错误:预期的对象。
我大大简化了事情,但仍然得到了错误。
HTML:
< select name =" viewtrain" ID = QUOT; viewtrain" onchange =" viewDetails(this);">
< option value =" 1"> Train 1< / option>
< option value =" 2"> Train 2< / option>
< option value =" 3"> Train 3< / option>
< / select> ;
和javascript :
函数viewDetails(sel)
{
alert(''hi'');
}
出于某种原因,这失败了。但是,如果我用
警报替换viewDetails:
< select name =" viewtrain" ID = QUOT; viewtrain" onchange =" alert(this);">
一切正常。
出于某种原因,似乎IE不是' '看''viewDetails。
-
好的我在发帖之前做了一些检查,似乎js
文件根本没有加载 - 但仅限于IE。我无法想象为什么。
这里是来源:
< script type =" text / javascript" src =" js / CalendarPopup.js">< / script>
< script type =" text / javascript" src =" js / details.js">< / script>
< script type =" text / javascript">
ACTIVE_SECTION =''晚列车详情'';
< / script>
之前和之后的工作正常。只有details.js没有加载
- 而且只在IE浏览器中。
我很难被这个......
I have a select with an onchange - it works find in Firefox, but in IE
6 I get an error: Object Expected.
I have simplified things drastically, and still get the error.
The HTML:
<select name="viewtrain" id="viewtrain" onchange="viewDetails(this);">
<option value="1">Train 1</option>
<option value="2">Train 2</option>
<option value="3">Train 3</option>
</select>
and the javascript:
function viewDetails(sel)
{
alert(''hi'');
}
For some reason, this fails. But if I replace viewDetails with an
alert:
<select name="viewtrain" id="viewtrain" onchange="alert(this);">
everything works correctly.
For some reason, it seems that IE isn''t ''seeing'' viewDetails.
-
OK I did a bit more checking before posting, and it seems that the js
file isn''t loading at all - but only in IE. I can''t imagine why.
here''s the source:
<script type="text/javascript" src="js/CalendarPopup.js"></script>
<script type="text/javascript" src="js/details.js"></script>
<script type="text/javascript">
ACTIVE_SECTION = ''Late Trains Details'';
</script>
The stuff before and after works fine. Only details.js is not loading
- and only in IE.
I''m stumped on this one...
推荐答案
也让我感到困惑。
4月23日,4:33 * pm,Tony< 23.t ... @ gmail.comwrote :
stumps me too.
On Apr 23, 4:33*pm, Tony <23.t...@gmail.comwrote:
我有一个带onchange的选择 - 它可以在Firefox中查找,但在IE中
6我得到一个错误:对象预期。
我大大简化了事情,但仍然出错。
HTML:
< select name =" viewtrain" ID = QUOT; viewtrain" onchange =" viewDetails(this);">
*< option value =" 1"> Train 1< / option>
*< option value =" 2"> Train 2< / option>
*< option value =" 3"> Train 3< / option>
< ; / select>
和javascript :
函数viewDetails(sel)
{
* alert(''hi'');
}
出于某种原因,这失败了。但是,如果我用
警报替换viewDetails:
< select name =" viewtrain" ID = QUOT; viewtrain" onchange =" alert(this);">
一切正常。
出于某种原因,似乎IE不是' '看''viewDetails。
-
好的我在发帖之前做了一些检查,似乎js
文件根本没有加载 - 但仅限于IE。我无法想象为什么。
这里是来源:
< script type =" text / javascript" src =" js / CalendarPopup.js">< / script>
< script type =" text / javascript" src =" js / details.js">< / script>
< script type =" text / javascript">
ACTIVE_SECTION =''晚列车详情'';
< / script>
之前和之后的工作正常。只有detail.js没有加载
- 只在IE浏览器中。
我很难被这个... ... b $ b
I have a select with an onchange - it works find in Firefox, but in IE
6 I get an error: Object Expected.
I have simplified things drastically, and still get the error.
The HTML:
<select name="viewtrain" id="viewtrain" onchange="viewDetails(this);">
* <option value="1">Train 1</option>
* <option value="2">Train 2</option>
* <option value="3">Train 3</option>
</select>
and the javascript:
function viewDetails(sel)
{
* alert(''hi'');
}
For some reason, this fails. But if I replace viewDetails with an
alert:
<select name="viewtrain" id="viewtrain" onchange="alert(this);">
everything works correctly.
For some reason, it seems that IE isn''t ''seeing'' viewDetails.
-
OK I did a bit more checking before posting, and it seems that the js
file isn''t loading at all - but only in IE. I can''t imagine why.
here''s the source:
<script type="text/javascript" src="js/CalendarPopup.js"></script>
<script type="text/javascript" src="js/details.js"></script>
<script type="text/javascript">
ACTIVE_SECTION = ''Late Trains Details'';
</script>
The stuff before and after works fine. Only details.js is not loading
- and only in IE.
I''m stumped on this one...
< el ********** @ gmail.comwrote in message
news: 4b ********************************** @ 59g2000h sb.googlegroups.com ...
也让我感到困惑。
4月23日下午4:33,Tony< 23.t ... @ gmail.comwrote:
<el**********@gmail.comwrote in message
news:4b**********************************@59g2000h sb.googlegroups.com...
stumps me too.
On Apr 23, 4:33 pm, Tony <23.t...@gmail.comwrote:
我有一个带有onchange的选择 - 它可以在Firefox中找到,但是在IE中
6我得到一个错误:对象预期。
我已经大大简化了事情,但仍然得到了错误。
HTML:
< select name =" viewtrain" ID = QUOT; viewtrain" onchange =" viewDetails(this);">
< option value =" 1"> Train 1< / option>
< option value =" 2"> Train 2< / option>
< option value =" 3"> Train 3< / option>
< / select> ;
和javascript :
函数viewDetails(sel)
{
alert(''hi'');
}
出于某种原因,这失败了。但是,如果我用
警报替换viewDetails:
< select name =" viewtrain" ID = QUOT; viewtrain" onchange =" alert(this);">
一切正常。
出于某种原因,似乎IE不是' '看''viewDetails。
-
好的我在发帖之前做了一些检查,似乎js
文件根本没有加载 - 但仅限于IE。我无法想象为什么。
这里是来源:
< script type =" text / javascript" src =" js / CalendarPopup.js">< / script>
< script type =" text / javascript" src =" js / details.js">< / script>
< script type =" text / javascript">
ACTIVE_SECTION =''晚列车详情'';
< / script>
之前和之后的工作正常。只有detail.js没有加载
- 只在IE浏览器中。
我很难被这个... ... b $ b
I have a select with an onchange - it works find in Firefox, but in IE
6 I get an error: Object Expected.
I have simplified things drastically, and still get the error.
The HTML:
<select name="viewtrain" id="viewtrain" onchange="viewDetails(this);">
<option value="1">Train 1</option>
<option value="2">Train 2</option>
<option value="3">Train 3</option>
</select>
and the javascript:
function viewDetails(sel)
{
alert(''hi'');
}
For some reason, this fails. But if I replace viewDetails with an
alert:
<select name="viewtrain" id="viewtrain" onchange="alert(this);">
everything works correctly.
For some reason, it seems that IE isn''t ''seeing'' viewDetails.
-
OK I did a bit more checking before posting, and it seems that the js
file isn''t loading at all - but only in IE. I can''t imagine why.
here''s the source:
<script type="text/javascript" src="js/CalendarPopup.js"></script>
<script type="text/javascript" src="js/details.js"></script>
<script type="text/javascript">
ACTIVE_SECTION = ''Late Trains Details'';
</script>
The stuff before and after works fine. Only details.js is not loading
- and only in IE.
I''m stumped on this one...
是因为你正在调用details.js,但是实际文件被称为
Details.js有资本吗?
Andy
Is it because you''re calling details.js but the actual file is called
Details.js with a capital?
Andy
4月23日凌晨1点59分,Andrew Bailey < a ... @ REMOVETOEMAILMEmanyplay.com>
写道:
On Apr 23, 1:59 am, "Andrew Bailey" <a...@REMOVETOEMAILMEmanyplay.com>
wrote:
< ellaiah.p ... @ gmail.comwrote in消息
新闻:4b ********************************** @ 59g2000h sb.googlegroups.com ...
也让我感到困惑。
4月23日下午4:33,Tony< 23.t。 .. @ gmail.comwrote:
<ellaiah.p...@gmail.comwrote in message
news:4b**********************************@59g2000h sb.googlegroups.com...
stumps me too.
On Apr 23, 4:33 pm, Tony <23.t...@gmail.comwrote:
我有一个带有onchange的选择 - 它可以在Firefox中查找,但在IE浏览器中
6我得到一个错误:预期的对象。
I have a select with an onchange - it works find in Firefox, but in IE
6 I get an error: Object Expected.
我已经大大简化了事情,但仍然得到了错误。
I have simplified things drastically, and still get the error.
HTML:
The HTML:
< select name =" viewtrain" ID = QUOT; viewtrain" onchange =" viewDetails(this);">
< option value =" 1"> Train 1< / option>
< option value =" 2"> Train 2< / option>
< option value =" 3"> Train 3< / option>
< / select> ;
<select name="viewtrain" id="viewtrain" onchange="viewDetails(this);">
<option value="1">Train 1</option>
<option value="2">Train 2</option>
<option value="3">Train 3</option>
</select>
和javascript :
function viewDetails(sel)
{
alert(''hi'');
function viewDetails(sel)
{
alert(''hi'');
}
}
由于某种原因,这会失败。但是,如果我用
警报替换viewDetails:
< select name =" viewtrain" ID = QUOT; viewtrain" onchange =" alert(this);">
一切正常。
For some reason, this fails. But if I replace viewDetails with an
alert:
<select name="viewtrain" id="viewtrain" onchange="alert(this);">
everything works correctly.
出于某种原因,似乎IE没有看到''viewDetails。
For some reason, it seems that IE isn''t ''seeing'' viewDetails.
-
好的我在发帖前做了一些检查,似乎js
文件根本没有加载 - 但仅限于IE。我无法想象为什么。
这里的来源:
-
OK I did a bit more checking before posting, and it seems that the js
file isn''t loading at all - but only in IE. I can''t imagine why.
here''s the source:
< script type ="文本/ JavaScript的" src =" js / CalendarPopup.js">< / script>
< script type =" text / javascript" src =" js / details.js">< / script>
< script type =" text / javascript">
ACTIVE_SECTION =''晚列车详情'';
< / script>
<script type="text/javascript" src="js/CalendarPopup.js"></script>
<script type="text/javascript" src="js/details.js"></script>
<script type="text/javascript">
ACTIVE_SECTION = ''Late Trains Details'';
</script>
之前和之后的工作正常。只有details.js没有加载
- 而且只在IE中。
The stuff before and after works fine. Only details.js is not loading
- and only in IE.
我很难被这个... ... b $ b
I''m stumped on this one...
是因为你正在调用details.js,但实际文件被称为
Details.js有一个大写?
Andy
Is it because you''re calling details.js but the actual file is called
Details.js with a capital?
Andy
这不是问题 - 我已经重新检查了路径&大写。
终于明白了。
文件中有一个名为class的变量。显然,IE不喜欢这样。将其更改为'classname''
修复了问题。
That wasn''t the problem - I had rechecked the path & capitalization.
Finally figured it out. There was a variable named ''class'' in the
file. Apparently, IE doesn''t like that. Changing it to ''classname''
fixed the problem.
这篇关于IE没有加载脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!