Topic: IE9 behavior issue with onchange? (Read 827 times)
Google dot what?
Posts: 2
16 credits Members referred : 0
« on: Jan 17, 2012, 05:47:17 pm »
I'm trying to change the selection of one SELECT form based on what the user clicks in another SELECT form. All the major browsers work as expected except IE9. Before I reach this code I populate responseText by using PHP.
Code:
if (xmlhttp.readyState==4 && xmlhttp.status==200) { var ajaxupdate = document.getElementById('region'); window.alert(xmlhttp.responseText); ajaxupdate.value = xmlhttp.responseText; }
The alert gives me the correct data in Chrome/Firefox/Safari but it's empty in IE9. I'm using this javascript function to respond to the change:
EDIT: Sorry for the edits. I had to clarify my issue after testing it further.
« Last Edit: Jan 17, 2012, 06:55:59 pm by autoglitch »
Google dot what?
Posts: 2
16 credits Members referred : 0
« Reply #1 on: Jan 19, 2012, 06:03:55 pm »
Fixed. There wasn't enough code in my description for anyone to figure this out. The issue was that i'm learning HTML, PHP and javascript using AJAX at the same time. I'm making strange mistakes but I guess that's how you learn.
Here is the original issue. I've left out the Javascript function and all the PHP because you don't need it.
Notice my misunderstanding. 'value' is an attribute NOT the text between the tags. I'm calling for a value that doesn't exist. For some reason, Safari, Chrome and Firefox understand my mistake and do what they think I want. It's not Microsofts fault this time lol.