473,883 Members | 1,679 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

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 2423
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
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
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
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
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
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
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
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
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

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.
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:
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...
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
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 ...
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...
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.
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: 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...
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: 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.
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.