IE让我发疯 [英] IE is driving me crazy

查看:62
本文介绍了IE让我发疯的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对IE问题感到困惑。这是我的问题:


Firefox:正确显示事物; javascripts工作;等等。


IE6:onClick不会调用指定的JavaScript。我知道这是因为出于测试目的来弄清楚这个问题,我把

警告显示我到达那里。它没有警觉。


IE7:应用程序甚至没有出现。它说有一个运行时

错误;它在第1行期待'';'';并询问我是否想要
调试。如果我回答是,它只是关闭弹出窗口并继续没有

进入任何调试模块。


这个应用程序由AJAX驱动并有一个加载的模板JS

库。当IE7完成时,它表示内容区域中没有内容。其他人(IE6和FF)在菜单栏中显示菜单。


问题:

1 - 是否有任何工具,无论多么残废,都可以帮助我调试IE6的

无法到达javascript的问题?

2 - 我需要在计算机上加载任何东西以便IE7将

输入一些调试模块?

3 - 有没有人知道为什么javascript可能无法在

IE中访问,但是在FF中?


哦,我希望我有像Firebug一样的Internet Explorer .... - :(

I am going nuts with IE problems. Here is my problem:

Firefox: Shows things properly; javascripts work; etc. etc.

IE6: The "onClick" doesn''t invoke the javascript that is designated. I
know this because for testing purposes to figure out this problem, I put
an alert to show that I get there. It doesn''t alert.

IE7: The application doesn''t even come up. It says there is a runtime
error; that it is expecting a '';'' at line 1; and asks if I want to
debug. If I answer yes, it just closes that popup and continues without
entering any debug module.

This application is driven by AJAX and has a template that loads the JS
libraries. When IE7 completes, it indicates that there is no content in
the content area. The others (IE6 and FF) present a menu in the menubar.

Questions:
1 - Is there ANY tool, however crippled, that can help me debug IE6''s
problems of not reaching the javascript?
2 - Is there anything I need to load on my computer so that IE7 will
enter some debug module?
3 - Does anyone have any idea why a javascript might not be reachable in
IE, but is in FF?

Oh how I wish I had something like Firebug for Internet Explorer.... -:(

推荐答案

sheldonlg写道:
sheldonlg wrote:

我对IE问题感到困惑。这是我的问题:


Firefox:正确显示事物; javascripts工作;等等。


IE6:onClick没有调用指定的javascript。我

知道这个因为测试目的弄清楚这个问题,我把

一个警示,表明我到达那里。它没有警觉。


IE7:应用程序甚至没有出现。它说有一个运行时

错误;它在第1行期待'';'';并询问我是否想要
调试。如果我回答是,它只是关闭弹出窗口并继续没有

进入任何调试模块。


这个应用程序由AJAX驱动并有一个加载的模板JS

库。当IE7完成时,它表示内容区域中没有内容。其他人(IE6和FF)在菜单栏中显示菜单。


问题:

1 - 是否有任何工具,无论多么残废,都可以帮助我调试IE6的

无法到达javascript的问题?

2 - 我需要在计算机上加载任何东西以便IE7将

输入一些调试模块?

3 - 有没有人知道为什么javascript可能无法在

IE中访问,但是在FF中?


哦,我希望我有像Firebug这样的Internet Explorer .... - :(
I am going nuts with IE problems. Here is my problem:

Firefox: Shows things properly; javascripts work; etc. etc.

IE6: The "onClick" doesn''t invoke the javascript that is designated. I
know this because for testing purposes to figure out this problem, I put
an alert to show that I get there. It doesn''t alert.

IE7: The application doesn''t even come up. It says there is a runtime
error; that it is expecting a '';'' at line 1; and asks if I want to
debug. If I answer yes, it just closes that popup and continues without
entering any debug module.

This application is driven by AJAX and has a template that loads the JS
libraries. When IE7 completes, it indicates that there is no content in
the content area. The others (IE6 and FF) present a menu in the menubar.

Questions:
1 - Is there ANY tool, however crippled, that can help me debug IE6''s
problems of not reaching the javascript?
2 - Is there anything I need to load on my computer so that IE7 will
enter some debug module?
3 - Does anyone have any idea why a javascript might not be reachable in
IE, but is in FF?

Oh how I wish I had something like Firebug for Internet Explorer.... -:(



这里有点多了[令人困惑]我将在下面显示两个

javacripts。一个在FF和IE6中工作。一个只在FF中工作。


两个都工作(带调试警报)插入):

函数addSupplier()

{

var searchList = document.getElementById(" supplierList");

var myObj = new Object();

var ind = searchList.selectedIndex;

var val = searchList.options [ind] .value;

alert(''val =''+ val);

if(val =='' -1''|| val == -1)

{

alert(''供应商需要有效值');

}

else

{

//删除搜索和列表框

var searchKeyword =

document.getElementById(" supplierSearchText");

var listSpan = document.getElementById(" supplierListSpan");

searchKeyword.value ='''';

listSpan.innerHTML =''< select id =" supplierList">< / select>'';


myObj.id = val ;

alert(''使用''+ myObj.id调用addSupplier);

handleExternalEvent(''Pccr'',''SupplierConfigurationController'',

''addSupplier'',myObj,noCallback);

}

}


仅适用于FF(插入调试警报):

函数showFamilyTree(obj,elementId)

{

alert(''显示元素''+ elementId的树);

if(elementId == 0){return;}

var block = document.getElementById(elementId);

if (obj.innerHTML ==" Show Tree")

{

block.style.display =" block";

obj。 innerHTML =" Hide Tree";

}

else

{

block.style.display =" ; none" ;;

obj.innerHTML =" Show Tree";

}

}

Here is a little more [confusing] information. I will show below two
javacripts. One work in both FF and IE6. One only worked in FF.

Worked in both (with debugging alert inserted):
function addSupplier()
{
var searchList = document.getElementById("supplierList");
var myObj = new Object();
var ind = searchList.selectedIndex;
var val = searchList.options[ind].value;
alert(''val='' + val);
if (val == ''-1'' || val == -1)
{
alert(''A valid value is required for the supplier'');
}
else
{
// Blank out the search and the listbox
var searchKeyword =
document.getElementById("supplierSearchText");
var listSpan = document.getElementById("supplierListSpan");
searchKeyword.value = '''';
listSpan.innerHTML = ''<select id="supplierList"></select>'';

myObj.id = val;
alert(''calling addSupplier with '' + myObj.id);
handleExternalEvent(''Pccr'', ''SupplierConfigurationController'',
''addSupplier'', myObj, noCallback);
}
}

Worked only in FF (with debugging alert inserted):
function showFamilyTree(obj, elementId)
{
alert(''showing tree for element '' + elementId);
if(elementId == 0) { return;}

var block = document.getElementById(elementId);
if (obj.innerHTML == "Show Tree")
{
block.style.display = "block";
obj.innerHTML = "Hide Tree";
}
else
{
block.style.display = "none";
obj.innerHTML = "Show Tree";
}
}


sheldonlg写道:
sheldonlg wrote:

sheldonlg写道:
sheldonlg wrote:

> I我对IE问题感到困惑。这是我的问题:

Firefox:正确显示内容; javascripts工作;等等。

IE6:onClick等。没有调用指定的javascript。
我知道这是因为出于测试目的找出这个问题,我发出警告,表明我到了那里。它没有警觉。

IE7:应用程序甚至没有出现。它说存在运行时错误;它在第1行期待'';'';并询问我是否想要调试。如果我回答是,它只是关闭弹出窗口并继续
而不进入任何调试模块。

这个应用程序由AJAX驱动,并有一个加载
JS库的模板。当IE7完成时,表示内容区域中没有
内容。其他人(IE6和FF)在菜单栏中显示菜单。

问题:
1 - 是否有任何工具,无论多么残废,都可以帮助我调试IE6'' s
没有达到javascript的问题?
2 - 我的计算机上是否需要加载任何东西以便IE7进入某些调试模块?
3 - 有没有人有知道为什么javascript可能无法访问在IE浏览器中,但是在FF中?

哦,我希望我有一些像Firebug for Internet Explorer .... - :(
>I am going nuts with IE problems. Here is my problem:

Firefox: Shows things properly; javascripts work; etc. etc.

IE6: The "onClick" doesn''t invoke the javascript that is designated.
I know this because for testing purposes to figure out this problem, I
put an alert to show that I get there. It doesn''t alert.

IE7: The application doesn''t even come up. It says there is a runtime
error; that it is expecting a '';'' at line 1; and asks if I want to
debug. If I answer yes, it just closes that popup and continues
without entering any debug module.

This application is driven by AJAX and has a template that loads the
JS libraries. When IE7 completes, it indicates that there is no
content in the content area. The others (IE6 and FF) present a menu
in the menubar.

Questions:
1 - Is there ANY tool, however crippled, that can help me debug IE6''s
problems of not reaching the javascript?
2 - Is there anything I need to load on my computer so that IE7 will
enter some debug module?
3 - Does anyone have any idea why a javascript might not be reachable
in IE, but is in FF?

Oh how I wish I had something like Firebug for Internet Explorer.... -:(



这里有一些[令人困惑的]信息。我将在下面显示两个

javacripts。一个在FF和IE6中工作。一个只工作在FF。


两者都工作(插入调试警报):

函数addSupplier()

{

var searchList = document.getElementById(" supplierList");

var myObj = new Object();

var ind = searchList.selectedIndex;

var val = searchList.op tions [ind] .value;

alert(''val =''+ val);

if(val =='' - 1''|| val == -1)

{

alert(''供应商需要有效值');

}

else

{

//删除搜索和列表框

var searchKeyword =

document.getElementById(" supplierSearchText");

var listSpan = document.getElementById(" supplierListSpan");

searchKeyword.value ='''';

listSpan.innerHTML =''< select id =" supplierList">< / select>'';


myObj.id = val ;

alert(''使用''+ myObj.id调用addSupplier);

handleExternalEvent(''Pccr'',''SupplierConfigurationController'',

''addSupplier'',myObj,noCallback);

}

}


仅适用于FF(插入调试警报):

函数showFa milyTree(obj,elementId)

{

alert(''显示元素''+ elementId的树);

if(elementId == 0){return;}

var block = document.getElementById(elementId);

if(obj.innerHTML ==" Show Tree")

{

block.style.display =" block";

obj.innerHTML =" Hide Tree";

}

其他

{

block.style.display =" none" ;;

obj .innerHTML =" Show Tree";

}

}


Here is a little more [confusing] information. I will show below two
javacripts. One work in both FF and IE6. One only worked in FF.

Worked in both (with debugging alert inserted):
function addSupplier()
{
var searchList = document.getElementById("supplierList");
var myObj = new Object();
var ind = searchList.selectedIndex;
var val = searchList.options[ind].value;
alert(''val='' + val);
if (val == ''-1'' || val == -1)
{
alert(''A valid value is required for the supplier'');
}
else
{
// Blank out the search and the listbox
var searchKeyword =
document.getElementById("supplierSearchText");
var listSpan = document.getElementById("supplierListSpan");
searchKeyword.value = '''';
listSpan.innerHTML = ''<select id="supplierList"></select>'';

myObj.id = val;
alert(''calling addSupplier with '' + myObj.id);
handleExternalEvent(''Pccr'', ''SupplierConfigurationController'',
''addSupplier'', myObj, noCallback);
}
}

Worked only in FF (with debugging alert inserted):
function showFamilyTree(obj, elementId)
{
alert(''showing tree for element '' + elementId);
if(elementId == 0) { return;}

var block = document.getElementById(elementId);
if (obj.innerHTML == "Show Tree")
{
block.style.display = "block";
obj.innerHTML = "Hide Tree";
}
else
{
block.style.display = "none";
obj.innerHTML = "Show Tree";
}
}



它没有成为一个差异如果我更正了这条线:

if(elementId == 0){return;}


更合适的是:

if(elementId.length == 0){return;}

It didn''t make a difference if I corrected the line:
if(elementId == 0) { return;}

to more properly be:
if (elementId.length == 0) { return;}


sheldonlg meinte:
sheldonlg meinte:

> IE6:onClick没有调用指定的javascript。
我知道这是因为出于测试目的找出这个问题,我发出警告,表明我到了那里。它没有警觉。
>IE6: The "onClick" doesn''t invoke the javascript that is designated.
I know this because for testing purposes to figure out this problem, I
put an alert to show that I get there. It doesn''t alert.



您是否已激活显示脚本错误?我想不是。

Have you activated "show script errors"? I suppose not.


> IE7:该应用程序甚至没有出现。它说存在运行时错误;它在第1行期待'';'';并询问我是否想要调试。如果我回答是,它只是关闭弹出窗口并继续
而不进入任何调试模块。
>IE7: The application doesn''t even come up. It says there is a runtime
error; that it is expecting a '';'' at line 1; and asks if I want to
debug. If I answer yes, it just closes that popup and continues
without entering any debug module.



您是否安装了脚本调试器?我想不是。

Have you installed a script debugger? I suppose not.


> 1 - 是否有任何工具,无论多么残缺,都可以帮助我调试IE6的<没有达到javascript的问题?
2 - 我的计算机上是否需要加载任何东西以便IE7进入某些调试模块?
>1 - Is there ANY tool, however crippled, that can help me debug IE6''s
problems of not reaching the javascript?
2 - Is there anything I need to load on my computer so that IE7 will
enter some debug module?



< http://blogs.msdn.com/ie/archive/2004/10/26/247912.aspx>


用于DOM检查的另一种(相当粗制滥用的)工具:

<http://blogs.msdn.com/ie/archive/2004/10/26/247912.aspx>

Another (rather shoddy) tool for DOM inspection:


> http://www.microsoft.com/downloads/details。 ASPX FAMILYID = e59c3964-672d-4511-bb3e-2d5e1db91038&安培; displaylang = EN>
>http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en>


> 3 - 有没有人知道为什么javascript可能无法访问
在IE中,但是在FF?
>3 - Does anyone have any idea why a javascript might not be reachable
in IE, but is in FF?



嗯。显示一些代码片段可能有所帮助。

Hmmm. Showing some of your code snippets might help.


仅在FF中工作(插入调试警报):

函数showFamilyTree(obj,elementId )

{

alert(''显示元素''+ elementId的树);
Worked only in FF (with debugging alert inserted):
function showFamilyTree(obj, elementId)
{
alert(''showing tree for element '' + elementId);



[snip]


然后错误在某个地方之前这个函数调用。


Gregor

-
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com :::Bildagenturfürdenalpinen Raum

[snip]

Then the error is somewhere "before" this function call.

Gregor
--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum


这篇关于IE让我发疯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆