Hello geniuses,
I have inherited a ColdFusion application which uses four lines of AJAX in order to populate a drop-down based upon the selection made in a previous drop-down. The first drop-down is a list of car "makes", for example: Ford, Chevrolet, etc. The second drop-down is to be populated with "models" based upon the selected "make".
However, the AJAX code appears to be no-longer working as the "models" drop-down is not being populated. We recently had to move the code to a new server, and it seems like, from that point forward, the AJAX is not populating the "models" drop-down.
Here is the code:
<SCRIPT LANGUAGE="JavaScript" SRC="prototype.js"></script>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
function doIt(){
makename = document.addvehicle.MAKE.value;
var url = 'https://fisnet.wvu.edu/secure/_listmodels.cfm';
var pars = 'make='+makename+'&edit=0';
var myAjax = new Ajax.Updater('models', url, { method: 'get', parameters: pars });
}
</SCRIPT>
Now, one change which had to be made was to update the URL variable from being only HTTP to HTTPS because this application is now behind that level of security. Other than that, the code is exactly the same now as it used to be.
One more thing, this code works differently based on the browser used. To explain, while the code is no-longer populating the drop-down, in FireFox it makes the "models" drop-down disappear completely, as though it's trying to update it, but something is failing. In IE 9 the drop-down remains, it just does not get populated. For IE 8 and Chrome there is a JavaScript error earlier in the application which prevents it from working, so I don't know how this AJAX code works in those browsers.
I do not know AJAX or JavaScript, I have never worked with them before, I am a ColdFusion developer with intermediate skill. I hope to be able to follow along with any suggestions or comments, I will try my best to do so. Please let me know if I can provide you with any additional information.
Thank you very much,
Jim