473,320 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Error: Unknown runtime error in ie while using ajax

134 100+
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
Mar 19 '08 #1
20 9050
vjayis
134 100+
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
Mar 19 '08 #2
vjayis
134 100+
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 100+
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
Hi,

What is the error that you are getting??

Regards,
RP
Mar 19 '08 #4
ronverdonk
4,258 Expert 4TB
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 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. xmlhttp.open("GET", "ajax.php?id=" + id + "&action=" + action, true);
Mar 19 '08 #6
acoder
16,027 Expert Mod 8TB
Threads merged. Please do not double post your questions.

Moderator.
Mar 19 '08 #7
vjayis
134 100+
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 Expert Mod 8TB
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 100+
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')">next</a></td></tr>
</table>

[/code]
thanks
Mar 21 '08 #10
acoder
16,027 Expert Mod 8TB
Which line does the error occur on?
Mar 21 '08 #11
vjayis
134 100+
Which line does the error occur on?
Hi

got solution for the problem.,

tried using div tag from the suggestion gave by "gits" in another forum.,

But when the page loads i get an error (only in ie which runs well in firefox)

Error: 'document.getElementById(...)' is null or not an object.

can u give me some t ips.,

thanks
Mar 22 '08 #12
acoder
16,027 Expert Mod 8TB
I assume the error occurs on the following line:
Expand|Select|Wrap|Line Numbers
  1. obj = document.getElementById( "ajax" );
Try using a different ID in case IE has a problem with the "ajax" id.

Failing that, is it possible that you have a test page?
Mar 22 '08 #13
vjayis
134 100+
I assume the error occurs on the following line:
Expand|Select|Wrap|Line Numbers
  1. obj = document.getElementById( "ajax" );
Try using a different ID in case IE has a problem with the "ajax" id.

Failing that, is it possible that you have a test page?


Hi
sorry i couldnt send u a test page.,

Can u tell me whether ajax can be run in ie5 and ie6.,

coz my ajax script is not running in an system which has ie6 installed., i hav tried even by enabling most of the options in browser settings.,

here is my javascript coding

Expand|Select|Wrap|Line Numbers
  1. function httprequest()
  2. {
  3.  
  4.   var xmlhttp;
  5.   try
  6.  {
  7.    xmlhttp=new XMLHttpRequest();
  8.  }
  9.   catch(e)
  10.  {
  11.     try
  12.    {
  13.     xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
  14.    }
  15.    catch(e)
  16.    { 
  17.      try
  18.     {
  19.          xmlhttp=new ActiveXObject("MICROSOFT.XMLHTTP")
  20.     }
  21.      catch(e)
  22.     {
  23.      alert("ur browser doesnot support Ajax");
  24.      return false;
  25.     }
  26.    }
  27.  
  28.  }
  29. ------------------------------
  30. }

when i click on the ajax link i got an alert message "ur browser doesnot support Ajax" which i hav given in the script.,

Thanks
Mar 24 '08 #14
acoder
16,027 Expert Mod 8TB
Can u tell me whether ajax can be run in ie5 and ie6.,
Yes, it can. You may need to watch the case - see if this link helps.
Mar 24 '08 #15
vjayis
134 100+
Yes, it can. You may need to watch the case - see if this link helps.


Hi

probably i had also used the same script in my page., but when i click the ajax link in my page., it displays the alert message "ur browser does not support ajax"

Here is my code:

Expand|Select|Wrap|Line Numbers
  1.  
  2. <script type="text/javascript">
  3. var id;
  4. var action;
  5. function httprequest(id,action)
  6. {
  7.  
  8. var xmlhttp;
  9. try
  10. {
  11.  xmlhttp=new XMLHttpRequest();
  12. }
  13. catch(e)
  14. {
  15.   try
  16.   {
  17.   xmlhttp=new Activexobject("Msxml2.XMLHTTP");
  18.   }
  19.   catch(e)
  20.   { 
  21.     try
  22.     {
  23.     xmlhttp=new Activexobject("MICROSOFT.XMLHTTP")
  24.     }
  25.     catch(e)
  26.     {
  27.      alert("ur browser doesnot support Ajax");
  28.      return false;
  29.     }
  30.   }
  31.  
  32. }
  33. xmlhttp.onreadystatechange=function()
  34.  if(xmlhttp.readyState==4)
  35.  { 
  36.  
  37.    document.getElementById("ajax").innerHTML=xmlhttp.responseText;
  38.  
  39.  }
  40. }
  41.  
  42. xmlhttp.open("GET","ajax.php?id="+id+"&action="+action,true);
  43. xmlhttp.send(null);
  44. }
  45.  
  46. function hidden(id,action)
  47. {
  48.  httprequest(id,action)
  49. }
  50. </script>
  51.  
Expand|Select|Wrap|Line Numbers
  1. <div id="ajax">
  2. <table >
  3. <tr>
  4. <td>------Place where i fetch data from another page and display---------</td>
  5. <td><a onclick="hidden('10','next')">next</a></td>
  6. </tr>
  7. </table>
  8. </div>
  9.  
and in my ajax.php page i hav displayed datas fetched from database which are above the id(10) i sent on onclick event;

but when i click the ajax(next) link., i get an alert message
"ur browser doesnot support Ajax"
in ie5 and ie6;
but its working well with ie7 and firefox.,

and i had even tried changing the id name from "ajax" to someother string., but nothing happened.,

could u help me to get rid of the problem.,

kind regards
vijay
Mar 25 '08 #16
acoder
16,027 Expert Mod 8TB
You've made the same mistake. Remember JavaScript is case-sensitive.

Activexobject should be ActiveXObject.

What I suggest is that you copy the code from the linked page and then try that.

The reason why it works in IE7/Firefox is that they both support the XMLHttpRequest object.
Mar 25 '08 #17
vjayis
134 100+
You've made the same mistake. Remember JavaScript is case-sensitive.

Activexobject should be ActiveXObject.

What I suggest is that you copy the code from the linked page and then try that.

The reason why it works in IE7/Firefox is that they both support the XMLHttpRequest object.

Hi

thanx., got the solution.,

ajax is working well in ie6.,

but after the page gets loaded.,

the status bar displays the message.,
"error on page." does my javascript made some errors., ??

could you help me in this

regards
Mar 26 '08 #18
acoder
16,027 Expert Mod 8TB
but after the page gets loaded.,

the status bar displays the message.,
"error on page." does my javascript made some errors., ??
Yes, you've got some errors. Double click the error icon and see what the error is.
Mar 26 '08 #19
vjayis
134 100+
Yes, you've got some errors. Double click the error icon and see what the error is.

Hi

got the solution by finding the errors.,

thanks
regards
vijay
Mar 28 '08 #20
acoder
16,027 Expert Mod 8TB
No problem, glad it's all working.
Mar 31 '08 #21

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

Similar topics

4
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...
7
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...
3
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...
1
by: jesmi | last post by:
my code is: U]employee.cfm <html> <head> <title>Employee List</title> </head> <body> <h1>Employee List</h1>
4
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. ...
1
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...
3
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...
21
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...
0
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.