I tested your code with the following data

var data = 'program1|program2|program3|';

and the drop down combo box displays

program1
program2
program3

correctly.

Again could you post the value of your data?

On Jul 18, 2:07 pm, naz <s.na...@gmail.com> wrote:
> i m using internet explorar.and data value is SE,DLD etc i m getting
> these values from db.
>
> On Jul 16, 11:14 am, Jules <jwira...@gmail.com> wrote:
>
> > The code looks fine to me.  Could you post the data value?  What is
> > the browser you are using?
>
> > On Jul 16, 2:58 pm, naz <s.na...@gmail.com> wrote:
>
> > > hi
> > > i m adding some values to drop down
> > > by usind j query by this code
> > > var programs=[];
> > >  programs=data.split('|');
> > > $('#p_course').length = 1;
> > >   for(var i=0;i<programs.length-1;i++)
> > >   {
> > >        var objDropdown =$('#p_course').get(0);
> > >        var objOption = new Option(programs[i],programs[i]);
> > >       objDropdown.options[objDropdown.length] = objOption;
> > >  }
> > > but when vales appear in drop down first value look like this
> > > |||||||||||||BSIT
> > > any body have any idea why it look like  this- Hide quoted text -
>
> > - Show quoted text -

Reply via email to