Hello i'm relatively new to web programming and i have been giving the task of moving one of my VB programs over to a web format. I generally use google chrome and that has been what i've been testing my web page in. Yesterday i got everything in my web application working great so i decided to check out what it looks like in IE, before it just seemed to be cosmetic, but i noticed it didn't refresh properly like it did in chrome. it wasn't a big deal but i wanted to see how it works in Firefox and i noticed that it won't populate a list box for me. here is the code below. Basically i use ajax to open another page which runs some SQL code then spits bad a list of dates to add to a list box called lstDates.
Sorry if this code isn't perfect, like i said i'm new to this and i'm open to any suggestions on how to make this work across multiple browsers. also i'd love to give you guys the url to check it out, but it's only used for out intranet. Thanks for any help.
Jon
Code:
var response = http.responseText;
var datearray= new Array();
document.getElementById("lstDates").options.length=0;
if(response.indexOf('|' != -1)) {
datearray = response.split('|');
var datelen = datearray.length;
}
////////////////////////////////////////////
///////For loop to go through////
//////datesarray and adds to//
/////lstDates listbox////////////
//////////////////////////////////////
for(var i=0; i<datelen - 1; i++){
document.getElementById("lstDates").add(new Option(datearray[i],datearray[i]));
}
Jon
Comment