I have a XMLHttpRequest problem, it work on IE, but it won;t work on firefox and chrome. I have no idea how to let firefox and chrome work.
I tried many method, still it won't work.
basely my web is let user select birthday, when you choose year, it will automatic have month on scroll down option, but it will not have the month value on chrome and firefox.
It work fine on IE. Do anyone have any idea.
Chrome and Firefox still support the XMLHttpRequest object don't they?
Why all this talk on ActiveX when there is a clear "else" statement in the code?
Or has the code originally posted been edited/changed? (I can't see any evidence of that)
In general the code looks fine to me.
It looks to have been a little mucked up - with the doSearchMonth() method nested inside the createXmlHttpRequest() but it is a fairly obvious typo.
My main beef with it is that it appears to be using global variables. I don't see a declaration of xmlHttp anywhere.
My suggestions for debugging: Use the F12 debugger!
Put some console.log statements in so you can see where the flow is going.
Set a break point and then step through - see if it is actually creating the xmlHttp object or not.
Switch on the network monitoring so you can see if an HTTP request is being made or not.
At the least you should be able to see an error message in the console.
chenchih lee wrote:I wish i can solve this issue without rewriting this code.
Basely this is my many yeas ago project. i just wish to implement this is my new web.
However if you're sentimentally attached to that code and don't mind expending a lot of time trying to get it to run, by all means go ahead and do that. There are people who have 50-year-old cars and spend much of their time tinkering with them and trying to keep them running, so it's not out of the question for you to be like them. But those people form a very small community -- most people prefer to just have a car which gets from A to B without costing too much -- so they are quite often figuring out things on their own.
Whose rules are you playing by? This tiny ad doesn't respect those rules:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop