appending select options with javascript
i currently have an empty drop down list that I would like to fill with some data I got from my database using javascript.  
I really have no idea how to do this so right now I am trying this.  
Javascript with JQuery.

    for (var i=0;i<data.length;i++)
      {
      var code$=data[i].String1;
      var desc$=data[i].Code_Description;
      var str$=$('<option value='+code$+'>'+desc$+'</option>');
      option$.append(str$);
      }
       $('#offCode').html(option$); 
I have also tried

    $('#offCode').append(option$); 
but none of this works

Thanks
appending select options with javascript
===

i currently have an empty drop down list that I would like to fill with some data I got from my database using javascript.  
I really have no idea how to do this so right now I am trying this.  
Javascript with JQuery.

    for (var i=0;i<data.length;i++)
      {
      var code$=data[i].String1;
      var desc$=data[i].Code_Description;
      var str$=$('<option value='+code$+'>'+desc$+'</option>');
      option$.append(str$);
      }
       $('#offCode').html(option$); 
I have also tried

    $('#offCode').append(option$); 
but none of this works

Thanks