Friday, 9 August 2013

multiselect box will not populate without alert

multiselect box will not populate without alert

I can't post all my code but I try to get the important pieces in here.
The problem I have is that I populate a multiselect box from the database
then I get the already selected items and add those to the selected
attribute. This all works in IE 7 which is what my testers are using,
unfortunately I'm on IE 9 and most of my users are on IE 9. This code
doesn't work on IE 9 or on firefox. The very weird thing is it will work
if I stick an alert just after the call to the function that populates the
multiselect.
after getting the selected values from the database through an ajax call I
use
var oldValues.push($(this).find("Value_ID).text());
I do an alert of oldValues they are there 31,32,45 then I use
$("drop2-input").val(oldValues);
If I put an alert after this line it works.
I have spent the majority of the day checking every line of code there are
no missing semicolons, no curly brackets out of place, and no parentheses
out of place. Does anyone know of a way to make this work. Oh I already
tried using a timeout to pause the code that just stoped the rest of the
page from loading.

No comments:

Post a Comment