andrew4582

loadComboboxStrings

Jun 6th, 2011
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function loadComboboxStrings(f, c, b) {
  2.     try {
  3.         var a = $(f);
  4.         a.options.length = 0;
  5.         $each(c, function (g, e) {
  6.             if (g == "") {
  7.                 return
  8.             }
  9.             a.options[a.options.length] = new Option(g, e, false, false)
  10.         });
  11.         a.set("value", b)
  12.     } catch (d) {
  13.         console.log("Error attempting to assign values to combobox with id='" + f + "'... ");
  14.         console.log(d.name + ": " + d.message)
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment