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
20 9152 acoder 16,027
Recognized Expert Moderator MVP
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.getEl ementById(...)' is null or not an object.
can u give me some t ips.,
thanks
acoder 16,027
Recognized Expert Moderator MVP
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
acoder 16,027
Recognized Expert Moderator MVP
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
acoder 16,027
Recognized Expert Moderator MVP
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
acoder 16,027
Recognized Expert Moderator MVP
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
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 incorrect."
or
"An unhandled exception of type
|
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...
|
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...
|
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.
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?
| |
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.
|
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
|
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";
|
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"...
|
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...
|
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...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |