错误:使用ajax时的未知运行时错误 [英] Error: Unknown runtime error in ie while using ajax

查看:79
本文介绍了错误:使用ajax时的未知运行时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当我试图使用ajax从一个页面获取数据到另一个页面时,我在IE中收到错误消息。但它在firefox中运行良好。,任何人都可以帮助我。


这是我的javascript代码。


[HTML]< script type =" text / javascript">

var id;

var action;

函数httprequest(id,action)

{

var xmlhttp;

尝试

{

xmlhttp = new XMLHttpRequest();

}

catch(e)

{

试试

{

xmlhttp = new Activexobject(" Msxml2.XMLHTTP");

}

catch(e)

{

try < br $>
{

xmlhttp = new Activexobject(" MICROSOFT.XMLHTTP")

}

catch(e)

{

alert(你的浏览器不支持Ajax);

返回false;

}

}


}

xmlh ttp.onreadystatechange = function()

{

if(xmlhttp.readyState == 4)

{

的document.getElementById(QUOT; AJAX")。innerHTML的= XMLHTTP。 responseText;

}

}


xmlhttp.open(" GET"," url /" ajax.php ?id =" + id +"& action =" + action,true);

xmlhttp.send(null);

}


隐藏功能(id,动作)

{

httprequest(id,action)

}

< / script>

< table id =" ajax"> ------我从其他页面获取数据并显示的位置 - --------

< tr>< td>< a onclick =" hidden('''',''next'')"> next< ; / a>< / td>< / tr>

< / table>

[/ HTML]


任何人都可以帮助我。

谢谢。,

vijay

hi
when i m trying to fetch data from one page to another page using ajax, i get an error message in IE., but it runs well in firefox., could anyone help me.,

here is my javascript code.,

[HTML]<script type="text/javascript">
var id;
var action;
function httprequest(id,action)
{

var xmlhttp;
try
{
xmlhttp=new XMLHttpRequest();
}
catch(e)
{
try
{
xmlhttp=new Activexobject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
xmlhttp=new Activexobject("MICROSOFT.XMLHTTP")
}
catch(e)
{
alert("ur browser doesnot support Ajax");
return false;
}
}

}
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
{
document.getElementById("ajax").innerHTML=xmlhttp. responseText;
}
}

xmlhttp.open("GET","url/"ajax.php?id="+id+"&action="+action,true);
xmlhttp.send(null);
}

function hidden(id,action)
{
httprequest(id,action)
}
</script>

<table id="ajax">------Place where i fetch data from another page and display---------
<tr><td><a onclick="hidden(''1'',''next'')">next</a></td></tr>
</table>
[/HTML]

Could anyone help me.,
Thanks.,
vijay

推荐答案

hi

当我试图使用ajax从一个页面获取数据到另一个页面时,我在IE中收到错误消息。但它在firefox中运行良好。,任何人都可以帮助我。,


这是我的javascript代码。


[HTML]< script type =" text / javascript">

var id;

var action;

函数httprequest(id,action)

{


var xmlhttp;

try

{

xmlhttp = new XMLHttpRequest();

}

catch(e)

{

尝试

{

xmlhttp =新的Activexobject(" Msxml2.XMLHTTP");

}

catch(e)

{

try

{

xmlhttp = new Activexobject(" MICROSOFT。 XMLHTTP")

}

catch(e)

{

alert(你的浏览器不支持Ajax) ;);

返回false;

}

}


}

xmlhttp.onreadystatechange = function()

{

if(xmlhttp.readyState == 4)

{

document.getElementById(" ajax")。innerHTML = xmlhttp。 responseText;

}

}


xmlhttp.open(" GET"," url /" ajax.php ?id =" + id +"& action =" + action,true);

xmlhttp.send(null);

}


隐藏功能(id,动作)

{

httprequest(id,action)

}

< / script>


< table id =" ajax"> ------我从另一个地方获取数据的地方页面和显示---------

< tr>< td>< a onclick =" hidden(''1'',''next'')" ;>下一个< / a>< / td>< / tr>

< / table>


[/ HTML ]

任何人都可以帮助我。

谢谢。,

vijay
hi
when i m trying to fetch data from one page to another page using ajax, i get an error message in IE., but it runs well in firefox., could anyone help me.,

here is my javascript code.,

[HTML]<script type="text/javascript">
var id;
var action;
function httprequest(id,action)
{

var xmlhttp;
try
{
xmlhttp=new XMLHttpRequest();
}
catch(e)
{
try
{
xmlhttp=new Activexobject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
xmlhttp=new Activexobject("MICROSOFT.XMLHTTP")
}
catch(e)
{
alert("ur browser doesnot support Ajax");
return false;
}
}

}
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
{
document.getElementById("ajax").innerHTML=xmlhttp. responseText;
}
}

xmlhttp.open("GET","url/"ajax.php?id="+id+"&action="+action,true);
xmlhttp.send(null);
}

function hidden(id,action)
{
httprequest(id,action)
}
</script>


<table id="ajax">------Place where i fetch data from another page and display---------
<tr><td><a onclick="hidden(''1'',''next'')">next</a></td></tr>
</table>


[/HTML]
Could anyone help me.,
Thanks.,
vijay


hi

当我试图使用ajax从一个页面获取数据到另一个页面时,我在IE中收到错误消息。但它在firefox中运行良好。,任何人都可以帮助我。

这是我的javascript代码。
hi
when i m trying to fetch data from one page to another page using ajax, i get an error message in IE., but it runs well in firefox., could anyone help me.,

here is my javascript code.,
展开 | 选择 | < span class =codeLinkonclick =WordWrap(this);> Wrap | 行号



hi

当我试图将数据从一个页面提取到另一个页面时使用ajax的页面,我在IE中收到错误消息。但它在firefox中运行良好。,任何人都可以帮助我。


这里是我的javascript代码。,


< script type =" text / javascript">

var id;

var action;

函数httprequest(id,action)

{


var xmlhttp;

try

{

xmlhttp =新的XMLHt tpRequest();

}

catch(e)

{

try

{

xmlhttp = new Activexobject(" Msxml2.XMLHTTP");

}

catch(e)

{

试试

{

xmlhttp = new Activexobject(" MICROSOFT.XMLHTTP")

}

catch(e)

{

alert(你的浏览器不支持Ajax);

返回false;

}

}


}

xmlhttp.onreadystatechange = function()

{

if(xmlhttp.readyState == 4)

{

document.getElementById(" ajax") .innerHTML = XMLHTTP。 responseText;

}

}


xmlhttp.open(" GET"," url /" ajax.php ?id =" + id +"& action =" + action,true);

xmlhttp.send(null);

}


隐藏功能(id,动作)

{

httprequest(id,action)

}

< / script>


< table id =" ajax"> ------我从另一个地方获取数据的地方页面和显示---------

< tr>< td>< a onclick =" hidden(''1'',''next'')" ;>下一个< / a>< / td>< / tr>

< / table>



任何人都可以帮助我。

谢谢。,

vijay
hi
when i m trying to fetch data from one page to another page using ajax, i get an error message in IE., but it runs well in firefox., could anyone help me.,

here is my javascript code.,

<script type="text/javascript">
var id;
var action;
function httprequest(id,action)
{

var xmlhttp;
try
{
xmlhttp=new XMLHttpRequest();
}
catch(e)
{
try
{
xmlhttp=new Activexobject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
xmlhttp=new Activexobject("MICROSOFT.XMLHTTP")
}
catch(e)
{
alert("ur browser doesnot support Ajax");
return false;
}
}

}
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
{
document.getElementById("ajax").innerHTML=xmlhttp. responseText;
}
}

xmlhttp.open("GET","url/"ajax.php?id="+id+"&action="+action,true);
xmlhttp.send(null);
}

function hidden(id,action)
{
httprequest(id,action)
}
</script>


<table id="ajax">------Place where i fetch data from another page and display---------
<tr><td><a onclick="hidden(''1'',''next'')">next</a></td></tr>
</table>



Could anyone help me.,
Thanks.,
vijay






你得到的错误是什么?


问候,

RP

Hi,

What is the error that you are getting??

Regards,
RP


这篇关于错误:使用ajax时的未知运行时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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