Displaying the picklist values through java scripts

Svar Displaying the picklist values through java scripts

  • 27. august 2008 06:01
     
     

     

    I have picklist by name fslr_cfpgifts,which has three values (eg: ABC,FGH,ERG) I want to display the value,

    i am writing some client side script in field onchange event as shown below.Instead of getting the value ABC or FGH or ERG

    i get as 1 or  2  or 3

     

    crmForm.all.fslr_cfpgifts.DataValue;

     

    how do i get the value that is selected in the picklist not the index..

     

    Please help me on this....

     

    Thanks...

     

Alle besvarelser

  • 27. august 2008 06:32
    Ejer
     
     

    To get the picklist value, you need {Field}.SelectedText

    In your case, it should be:

    crmForm.all.fslr_cfpgifts.SelectedText

     

    Jim

  • 27. august 2008 06:42
     
     Svar

    Hi Goobs,

     

    If u want the selected values of the picklist , below is the code what you as suppose to write

     

    crmForm.all.fslr_cfpgifts.SelectedText;

     

    Instead of DataValue write SelectedText