473,728 Members | 1,878 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ajax issue with Internet Explorer (no error message either)

65 New Member
I have created a little chat application that seems to work 100% on Mozilla Firefox, Google Chrome, and Safari, (tried it in Opera, and it seems to work, but the cookies are screwing everything up; this is probably because my install is not being run under an administrator account), but not Internet Explorer.

Chat • Login
http://preview.moltx.name/chat_v2/library.js

Everything works fine, up until you get to the chat room itself. Internet Explorer just sits, and does nothing. Doesn't even have an error. It seems to be able to send data (but not fully; send a message using Internet Explorer, and then check the active users list on another browser), and is completely non responsive to data received.

It's made with JavaScript + PHP.
Nov 27 '08 #1
15 2401
moltendorf
65 New Member
I have repaired one issue but it didn't solve the problem with Internet Explorer properly displaying what it receives.

Internet Explorer was sending two messages when submitted; one empty, one of the content you have submitted. I put a server-side filter to prevent empty messages from being submitted (since it also causes a bug with the other browsers) so now the messages submitted from Internet Explorer appear on the other browsers properly.

Does this have anything to do with Internet Explorer, not supporting the World Wide Web Consortium Document Object Model perhaps?
Nov 27 '08 #2
acoder
16,027 Recognized Expert Moderator MVP
The most probable reason is that IE is caching the response, so no further requests to the same URL are made. To disable caching, add some headers, or make the URL unique, e.g. by adding the timestamp.
Nov 28 '08 #3
moltendorf
65 New Member
I've added the following headers to my server's response for every page:
  • Content-Control: no-cache, must-revalidate
  • Expires: -1
  • Pragma: no-cache

Nothing appears to have changed, except on Firefox, which appears to no longer "not do anything" (once in a while, it wouldn't actually reload the page containing the script, causing the server to not reset the message counter, and thus not receive all messages).

I cleared my history/cache/cookies on Internet Explorer on both of my computers several times. With no change in behavior of the script.

Even if it was caching the response, it should at least receive one message, "Connected. ," no matter what from my server and after receiving it, it should automatically strip the <p>Connecting.. .</p> from the chat log, and from the users list, and replace the one in the chat history with, "Connected. ," and the one in the users list with the username (colored green) that you signed in with.

Please note that if you're testing this out, you're not really "registerin g" on the site, just use any old username to "log in" (it doesn't really require you to be registered in any way, hence no password box) and it will add it to the database temporarily to track which room you're in and whatnot, to send the messages you have not received yet when the script queries for them.

I also tried the timestamp thing by adding +"&timestamp="+ unixTime () to the XMLHttpRequest. open url, and same thing; no change in script behavior.
Nov 28 '08 #4
acoder
16,027 Recognized Expert Moderator MVP
I notice that you have this in your code:
Expand|Select|Wrap|Line Numbers
  1. if (window.IExplore)
  2.                             {
  3.                                 document.write (this.responseText);
  4.                             }
I'm not sure what it's for, but using document.write( ) after the page has loaded has unexpected results. It reopens the page for writing. If you want to add content to the page after loading, use appendChild().
Nov 29 '08 #5
moltendorf
65 New Member
That is not there for "functional " reasons. I use document.write when I can't seem to figure out what is going wrong to just "dump" variables to the page, and which on IE, it's not receiving any data for it to dump, so if that actually worked... I'd remove it, knowing that the variable there isn't the cause of IE not working.

So right now that's definitely not causing any problems. It will need to be removed in the future when I do figure out what's wrong with IE, but right now it's there so that once I do fix the problem with data not coming in it'll be like "DING <?xml version="1.0" encoding="UTF-8" ?><messages><ty pe>history</type><number>1</number><message ><content>Connt ected.</content></message></messages>" right in the middle of the screen. A hallelujah moment!
Nov 30 '08 #6
moltendorf
65 New Member
Alright, it looks like it is an issue with appendChild in Internet Explorer. It is supported, but in a different way. I spent about an hour searching Google for what was going wrong, but now need to find a solution.
Nov 30 '08 #7
moltendorf
65 New Member
Never mind, I have no clue any more. I dumped a document.write and wrote all the text to the screen on all browsers but Internet Explorer, which points the blame finger back to XMLHttpRequest.
Nov 30 '08 #8
moltendorf
65 New Member
It appears as if "this." anything is underfined in Internet Explorer. Is there any way to have this. populated properly?
Nov 30 '08 #9
acoder
16,027 Recognized Expert Moderator MVP
See this. You might try explicitly adding it. Using an object for the Ajax calls should also solve this problem.
Nov 30 '08 #10

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

Similar topics

1
1660
by: Girish Pal Singh | last post by:
Internet Explorer is unable to access the form and its elements. Even server side generated scripts give error. Same code runs fine on other browsers. Whats the problem? I have IE 6.0 on Windows XP Professional.
0
1375
by: Florin M | last post by:
I am running a custom application developed with ASP.NET 1.1, C# and Visual Studio 2003. I recently installed SP2 for XP Professional. When I close the Internet Explorer window where the app runs, Internet Explorer crashes and I get the generic error message window with DEBUG, SEND ERROR REPORT & DON'T SEND buttons. I checked the event log and the error item I found has the following message:
3
1992
by: Jason | last post by:
I have a web page that contains textareas. These are dynamically added via asp when the page loads based on database records. The user also has the ability to add more text areas via innerhtml. If the user clicks the add text area button too fast or too many times.. they will get the following error: Internet Explorer Has Encountered a Problem and Needs to Close. After reading msdns page about this error I doubt that there is a fix...
2
2293
by: CathieC | last post by:
I have a websote developed using visual studio 2005 beta , .net version 2 i deploy my application to a server and it is run from client computers. One of the users gets the error "Internet Explorer cannot open the internet site "XXXXX" Operation aborted" this happens when they click on a menu item to open a page. they do not get
0
1018
by: bazubwabo | last post by:
hi everybody, I currently use oracle 9i forms developer for to build some forms ,and however by running the form ,i've gotten an internet explorer error message:"Internet explorer has encountered a problem and needs to close .We are sorry for the inconvenience."). Therefore there is someone who should help me to solve the problem,or there is someone who has some ideas of how to set up it? N.B:I used nowadays internet explorer 6 ...
3
16033
by: Kosmos | last post by:
Hey ya'll...I can't seem to figure out why I'm getting this error message, but it all started when I added the new line of code with the recSet5.AddNew --- when I ran the first line, the logic worked and the fields were populated properly, when I added all the rest, it wouldn't run and even when I tried to go back, it still won't run now...I am getting the following error message: "Either BOF or EOF is True, or the current record has been...
3
1511
by: JanaAnandh | last post by:
In my application, When trying to Logout getting internet explorer error message. This error is observed in Win 2000 but not in Win XP machines. Please help me out to resolve the issue.
0
8900
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
8758
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,...
1
9197
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,...
0
9129
tracyyun
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...
0
8126
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...
1
6716
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6013
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();...
0
4524
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...
1
3236
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 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.