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
20 9050
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
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
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
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
- xmlhttp.open("GET", "ajax.php?id=" + id + "&action=" + action, true);
Threads merged. Please do not double post your questions.
Moderator.
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
You have an extra double quote in the URL string: - "url/"ajax.php?id="+id+"&action="+action
instead of - "url/ajax.php?id="+id+"&action="+action
You have an extra double quote in the URL string: - "url/"ajax.php?id="+id+"&action="+action
instead of - "url/ajax.php?id="+id+"&action="+action
hi
sorry for the mistake.,
i hav written - "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., -
<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)
-
{
-
-
obj = document.getElementById( "ajax" );
-
-
obj.innerHTML = xmlhttp.responseText;
-
getBufferText();
-
-
}
-
}
-
-
xmlhttp.open("GET", "url/ajax.php?id=" + id + "&action=" + action, true);
-
xmlhttp.send(null);
-
}
-
-
function hidden(id,action)
-
{
-
httprequest(id,action)
-
}
-
</script>
-
[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
Which line does the error occur on?
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
I assume the error occurs on the following line: - 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?
I assume the error occurs on the following line: - 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 -
function httprequest()
-
{
-
-
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;
-
}
-
}
-
-
}
-
------------------------------
-
}
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
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.
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: -
-
<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","ajax.php?id="+id+"&action="+action,true);
-
xmlhttp.send(null);
-
}
-
-
function hidden(id,action)
-
{
-
httprequest(id,action)
-
}
-
</script>
-
-
<div id="ajax">
-
<table >
-
<tr>
-
<td>------Place where i fetch data from another page and display---------</td>
-
<td><a onclick="hidden('10','next')">next</a></td>
-
</tr>
-
</table>
-
</div>
-
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
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.
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
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.
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
No problem, glad it's all working.
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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...
|
by: jesmi |
last post by:
my code is:
U]employee.cfm
<html>
<head>
<title>Employee List</title>
</head>
<body>
<h1>Employee List</h1>
|
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.
...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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)...
|
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...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
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....
|
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...
|
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...
| |