473,839 Members | 1,470 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error: Unknown runtime error in ie while using ajax

134 New Member
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.XMLHT TP")
}
catch(e)
{
alert("ur browser doesnot support Ajax");
return false;
}
}

}
xmlhttp.onready statechange=fun ction()
{
if(xmlhttp.read yState==4)
{
document.getEle mentById("ajax" ).innerHTML=xml http.responseTe xt;
}
}

xmlhttp.open("G ET","url/"ajax.php?id="+ id+"&action="+a ction,true);
xmlhttp.send(nu ll);
}

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

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

Could anyone help me.,
Thanks.,
vijay
Mar 19 '08 #1
20 9119
vjayis
134 New Member
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.XMLHT TP")
}
catch(e)
{
alert("ur browser doesnot support Ajax");
return false;
}
}

}
xmlhttp.onready statechange=fun ction()
{
if(xmlhttp.read yState==4)
{
document.getEle mentById("ajax" ).innerHTML=xml http.responseTe xt;
}
}

xmlhttp.open("G ET","url/"ajax.php?id="+ id+"&action="+a ction,true);
xmlhttp.send(nu ll);
}

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


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


[/HTML]
Could anyone help me.,
Thanks.,
vijay
Mar 19 '08 #2
vjayis
134 New Member
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.,
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. var id;
  3. var action;
  4. function httprequest(id,action)
  5. {
  6.  
  7. var xmlhttp;
  8. try
  9. {
  10. xmlhttp=new XMLHttpRequest();
  11. }
  12. catch(e)
  13. {
  14. try
  15. {
  16. xmlhttp=new Activexobject("Msxml2.XMLHTTP");
  17. }
  18. catch(e)
  19. {
  20. try
  21. {
  22. xmlhttp=new Activexobject("MICROSOFT.XMLHTTP")
  23. }
  24. catch(e)
  25. {
  26. alert("ur browser doesnot support Ajax");
  27. return false;
  28. }
  29. }
  30.  
  31. }
  32. xmlhttp.onreadystatechange=function()
  33. {
  34. if(xmlhttp.readyState==4)
  35. {
  36. document.getElementById("ajax").innerHTML=xmlhttp.responseText;
  37. }
  38. }
  39.  
  40. xmlhttp.open("GET","url/"ajax.php?id="+id+"&action="+action,true);
  41. xmlhttp.send(null);
  42. }
  43.  
  44. function hidden(id,action)
  45. {
  46. httprequest(id,action)
  47. }
  48. </script>
  49.  
  50.  
  51. <table id="ajax">------Place where i fetch data from another page and display---------
  52. <tr><td><a onclick="hidden('1','next')">next</a></td></tr>
  53. </table>
Could anyone help me.,
Thanks.,
vijay
Mar 19 '08 #3
rpnew
188 New Member
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.XMLHT TP")
}
catch(e)
{
alert("ur browser doesnot support Ajax");
return false;
}
}

}
xmlhttp.onready statechange=fun ction()
{
if(xmlhttp.read yState==4)
{
document.getEle mentById("ajax" ).innerHTML=xml http.responseTe xt;
}
}

xmlhttp.open("G ET","url/"ajax.php?id="+ id+"&action="+a ction,true);
xmlhttp.send(nu ll);
}

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


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



Could anyone help me.,
Thanks.,
vijay
Hi,

What is the error that you are getting??

Regards,
RP
Mar 19 '08 #4
ronverdonk
4,258 Recognized Expert Specialist
Please enclose your posted code in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use [code] tags in future.

This is not a PHP question, but a JavaScript one.

This thread will be moved to the JS forum.

moderator
Mar 19 '08 #5
hsriat
1,654 Recognized Expert Top Contributor
Expand|Select|Wrap|Line Numbers
  1. xmlhttp.open("GET", "ajax.php?id=" + id + "&action=" + action, true);
Mar 19 '08 #6
acoder
16,027 Recognized Expert Moderator MVP
Threads merged. Please do not double post your questions.

Moderator.
Mar 19 '08 #7
vjayis
134 New Member
Hi,

What is the error that you are getting??

Regards,
RP
hi Rp.,

when i click on the ajax link("Next") i get an error displaying tht:
Error: Unknown runtime error;

thts it.,

thanks.,
vijay
Mar 20 '08 #8
acoder
16,027 Recognized Expert Moderator MVP
You have an extra double quote in the URL string:
Expand|Select|Wrap|Line Numbers
  1. "url/"ajax.php?id="+id+"&action="+action
instead of
Expand|Select|Wrap|Line Numbers
  1. "url/ajax.php?id="+id+"&action="+action
Mar 20 '08 #9
vjayis
134 New Member
You have an extra double quote in the URL string:
Expand|Select|Wrap|Line Numbers
  1. "url/"ajax.php?id="+id+"&action="+action
instead of
Expand|Select|Wrap|Line Numbers
  1. "url/ajax.php?id="+id+"&action="+action

hi

sorry for the mistake.,

i hav written
Expand|Select|Wrap|Line Numbers
  1. "url/ajax.php?id="+id+"&action="+action
[/quote] like this only.,

instead of giving the full link i just typed it inside the quoutes to replace my web link., just to highlight the link.,

I replace my full code one more time.,


Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. var id;
  3. var action;
  4. function httprequest(id,action)
  5. {
  6.  
  7. var xmlhttp;
  8. try
  9. {
  10.  xmlhttp=new XMLHttpRequest();
  11. }
  12. catch(e)
  13. {
  14.   try
  15.   {
  16.   xmlhttp=new Activexobject("Msxml2.XMLHTTP");
  17.   }
  18.   catch(e)
  19.   { 
  20.     try
  21.     {
  22.     xmlhttp=new Activexobject("MICROSOFT.XMLHTTP")
  23.     }
  24.     catch(e)
  25.     {
  26.      alert("ur browser doesnot support Ajax");
  27.      return false;
  28.     }
  29.   }
  30.  
  31. }
  32. xmlhttp.onreadystatechange=function()
  33.  if(xmlhttp.readyState==4)
  34.  { 
  35.  
  36.    obj = document.getElementById( "ajax" );
  37.  
  38.    obj.innerHTML = xmlhttp.responseText;
  39.    getBufferText();
  40.  
  41.  }
  42. }
  43.  
  44. xmlhttp.open("GET", "url/ajax.php?id=" + id + "&action=" + action, true);
  45. xmlhttp.send(null);
  46. }
  47.  
  48. function hidden(id,action)
  49. {
  50.  httprequest(id,action)
  51. }
  52. </script>
  53.  
[code-php]

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

[/code]
thanks
Mar 21 '08 #10

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

Similar topics

4
4350
by: neil brown | last post by:
Whenever I try and run a project in VB.NET 2003, all i get is: "An unhandled exception of type 'System.ArgumentException' occurred in Unknown Module. Additional information: The parameter is incorrect." or "An unhandled exception of type
7
38032
by: John | last post by:
Hi Everyone, I'm having this extremely annoying problem with Internet Explorer 6, giving me an error message saying "unknown runtime error" whenever I try to alter the contents of a <divelement using innerHTML. Now, I've researched this problem on the web, and found many references to it, but none of them quite addressed my specific situation, and since my experience with JavaScript is limited, I was not able to adapt the solutions I...
3
11109
by: =?Utf-8?B?bWNpbWFnaW5n?= | last post by:
We have recently applied AJAX to our web site, nothing particularly fancy, just some update panel, progress images and collapsible panels, just the basics to improve the user experience. The project has gone fantastically well except we have ran into a strange error when accessing the site from inside of one of our client networks. All the pages load fine without any problems, but if you try and press any buttons on an AJAX enabled...
1
7861
by: jesmi | last post by:
my code is: U]employee.cfm <html> <head> <title>Employee List</title> </head> <body> <h1>Employee List</h1>
4
4125
by: Jeremy | last post by:
I am getting an error Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occured while processing the request on the server. The status code returned from the server was:500. It appears that this error occurs after I browse to the specific page and leave it for a while, then click on a linkbutton within an update panel. Has anyone experienced this behavior?
1
7791
by: Valli | last post by:
Hi, I have an issue with the content page('default.aspx') while executing the asp.net project. I am getting the error 1. unknown server tag 'asp.Scriptmanager' 2. unknown server tag 'asp.collapsiblepanelextender' 3. unknown server tag 'asp.UpdatePanel Why I am getting this error.? What should be done to fix it.
3
1953
by: nnaveenraju | last post by:
Hi Gurus, I am new to Ajax and JAVA. I am able to call the servlet class from the JSP page using AJAX. The servlet class is called successfully. I am processing some data and the data has to passed back to the front end JSP. I have used the following code
21
2138
by: sheldonlg | last post by:
I have googled for '"Internet Explorer" "Unknown runtime error"' and not found anything useful. I have the following (for simplicity of presentation here): <div><table><tr><th id="foo"></th></tr></table></div> In my javascript I have two lines: var titleObj = document.getElementById('foo'); titleObj.innerHTML = "Name is bar";
0
3602
by: Julien Hoffmann | last post by:
Hi all, Me too I thought I could give out my solution to a similar problem ; hopefully it will help. Long story made short : On a VB.NET 3.5 + AJAX web site, I wanted my visitors to be able to navigate inside one page unsing anchors. Anchors inside content rendered by a listview inside an update panel are ok, but....believe it or not, the "top" anchor, referring to the top of page was causing the "unknown error" ! Anchor was <a name="top"...
0
9855
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9697
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10907
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10586
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9426
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7017
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4484
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4064
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3133
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.