Author Topic: Regarding server side returning response set to dropdown textbox  (Read 3389 times)

shabins

  • Newbie
  • *
  • Posts: 3
    • View Profile
Regarding server side returning response set to dropdown textbox
« on: February 05, 2016, 09:55:25 am »
Hello Team,
Recently i used your widget pqselect and it is working fine for client side but i m stuck at server side response.
on load of jsp page its working fine but after adding some record into database via this option and when response is returning than dropdown textbox must show value from database and checkbox must show checked.


Thanx for the reply..
But is there any method which sets returning value in textbox.How should i pass the datasource in the following call.

            $("#selectedDomainValue").pqSelect({
                multiplePlaceholder: 'Select Policy',
                checkbox: true //adds checkbox to options   
            }).on("change", function(evt) {
                selectedVal = $(this).val();
                $("#selectPolicies").val(selectedVal);
                //alert(val);
            }).pqSelect('close'); 
« Last Edit: February 05, 2016, 10:16:00 am by shabins »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Re: Regarding server side returning response set to dropdown textbox
« Reply #1 on: February 05, 2016, 09:59:58 am »
You should add selected attribute to the options which you want checked in pqSelect.

Code: [Select]
<select> 
  <option value="audi" selected>Audi</option>
  ....
</select>

shabins

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Regarding server side returning response set to dropdown textbox
« Reply #2 on: February 05, 2016, 10:16:50 am »
Thanx for the reply..
But is there any method which sets returning value in textbox.How should i pass the datasource in the following call.

            $("#selectedDomainValue").pqSelect({
                multiplePlaceholder: 'Select Policy',
                checkbox: true //adds checkbox to options   
            }).on("change", function(evt) {
                selectedVal = $(this).val();
                $("#selectPolicies").val(selectedVal);
                //alert(val);
            }).pqSelect('close');