Forum Replies Created

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts

  • claudegel
    Participant

    I finally get it to work by using dataAdapter.dataBind().
    The grid data is initialized via:

    Var source2 ={
    ...
    data: {
           select: true,
           dbase: table_form,
           numrow: "*",
           filtre: "formno=" + form_no,
           ordre: "row asc",
           field: "*"
       },
    ...
    }
    var dataAdapter2 = new $.jqx.dataAdapter(source2);
    

    and in my 2 dropdownlist I use

     $("#jqxWidget").on('select', function (event)
            		{
            		// get client's ID.
            		  var nocli = event.args.item.value;
    			
            		  $("#jqxWidget").jqxDropDownList({ disabled: true });
            		  $("#open_list").jqxDropDownList({ disabled: true });
            		  dataAdapter2.dataBind();
            		});

    to initialise an empty datagrid

    and

    $("#open_list").on('select', function (event)
            		{
        				//rouver le numero du formulaire
    					form_no = event.args.item.value;
    					// desactiver les autre liste
    					$("#jqxWidget").jqxDropDownList({ disabled: true });
    					$("#open_list").jqxDropDownList({ disabled: true });
    					$('#jqxdate').jqxDateTimeInput({disabled: true});
    					// changer le numero de formulaire
    					$('#formulaire').html("Formulaire no: " + form_no);
    					//mettre a jour la grille
    					source2.data.filtre = "formno=" + form_no; //change the formno value before reloading data
    					dataAdapter2.dataBind();
            		});
    

    to load a specific datagird for update

    now my problem is that my two add and delete button that were working perfectly to add empty row in my grid and to delete selected row are not working anymore. Is it because the dataAdapter2.dataBind(); is issued inside a function so it is not visible outside that function ???


    claudegel
    Participant

    Hi, when I test with your data file as posted above it work but when I test with mine it do not work. I suspect that mine contain special caracters that I need to filter. Could you tel me if I need to filter some special caracter like “,” “-” “/” “‘” from my data.

    also in your exemple the valueMember is set to “group”, but normally with a dropdownlist we need to select a specific item not a group of items. Is it possible to set it to Code: so when the user click on a description le value returned is the code of that selection.

    here is my data.txt

    [{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/MR/12'</div><div>Description: 'Non emb- Marjolaine- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/OR/12'</div><div>Description: 'Non emb- Origan- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/MN/12'</div><div>Description: 'Non emb- Menthe- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/ES/12'</div><div>Description: 'Non emb- Estragon- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/PF/12'</div><div>Description: 'Non emb- Persil frisé 12un'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/CB/12'</div><div>Description: 'Non emb- Ciboulette- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/BV/12'</div><div>Description: 'Non emb- Basilic- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/AN/24'</div><div>Description: 'Non emb- Aneth- 24u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/AN/12'</div><div>Description: 'Non emb- Aneth- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/OS/12'</div><div>Description: 'Non emb- Oseille- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/SU/12'</div><div>Description: 'Non emb- Sauge- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/BP/12'</div><div>Description: 'Non emb- Basil Pourp- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/SR/12'</div><div>Description: 'Non emb- Sarriette- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/CE/12'</div><div>Description: 'Non emb- Cerfeuil- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/ML/12'</div><div>Description: 'Non emb- Mélisse- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/FE/12'</div><div>Description: 'Non emb- Fenouil- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/PI/12'</div><div>Description: 'Non emb- Persil Ital- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'FHCBBN/5'</div><div>Description: 'Ciboulette non emballee - 5 do'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/TH/12'</div><div>Description: 'Non emb- Thym- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/RO/12'</div><div>Description: 'Non emb- Romarin- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/BC/12'</div><div>Description: 'Herbes non emballée Baslic citron douza'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/BT/12'</div><div>Description: 'Herbes non emballée Basilic Thai douzai'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'FHMNBN/2'</div><div>Description: 'Menthe non emballee - 2 douz.'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'FHMNBN/3'</div><div>Description: 'Menthe non emballee - 3 douz.'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/BN/12'</div><div>Description: 'Herbes non emb. Basilic Nufar douzaine'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HNE/CO/12'</div><div>Description: 'Non emb- Coriandre- 12u'</div></div>", "group": "1" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC1/OS/6'</div><div>Description: 'Clam Marv- Oseille- 6/10g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC1/ML/6'</div><div>Description: 'Clam Marv- Mélisse- 6/10g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21/ES/6'</div><div>Description: 'Clamshell estragon 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21/AN/6'</div><div>Description: 'Clamshell aneth 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21/CO/6'</div><div>Description: 'Clamshell coriandre 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21/BV/6'</div><div>Description: 'Clamshell Basilic 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21/FE/6'</div><div>Description: 'Clamshell fenouil 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC1/SR/6'</div><div>Description: 'Clam Marv- Sariette 6/10g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC1/MP/6'</div><div>Description: 'Clam Marv- Mél. Pâtes 6/10g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC1/MR/6'</div><div>Description: 'Clam Marv- Marjolaine 6/10g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC1/MV/6'</div><div>Description: 'Clam Marv- Mél. Volaille 6/10g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC1/MF/6'</div><div>Description: 'Clam Marv- Mél. Poisson- 6/10g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21/TH/6'</div><div>Description: 'Clamshell thym 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21S/BT/6'</div><div>Description: 'Clamshell basil. Thai 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21S/BA/6'</div><div>Description: 'Clamshell basil. Authentic 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21S/BC/6'</div><div>Description: 'Clamshell basil. Citron 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21/SU/6'</div><div>Description: 'Clamshell sauge 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21/RO/6'</div><div>Description: 'Clamshell romarin 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21/OR/6'</div><div>Description: 'Clamshell origan 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21/MN/6'</div><div>Description: 'Clamshell menthe 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21S/BP/6'</div><div>Description: 'Clamshell basil. Pourpre 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21S/BG/6'</div><div>Description: 'Clamshell basil. Grand Vert 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC21/CB/6'</div><div>Description: 'Clamshell ciboulette 21g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC1/MM/6'</div><div>Description: 'Clam Marv- Mél. Ragoût- 6/10g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC1/LR/6'</div><div>Description: 'Clam Marv- Laurier 6/10g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC1/CE/6'</div><div>Description: 'Clam Marv- Cerfeuil 6/10g'</div></div>", "group": "2" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/ES/6'</div><div>Description: 'Scellé Marv- Estragon- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/MR/6'</div><div>Description: 'Scellé Marv- Marjolaine- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/OR/6'</div><div>Description: 'Scellé Marv- Origan- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/OS/6'</div><div>Description: 'Scellé Marv- Oseille- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/SR/6'</div><div>Description: 'Scellé Marv- Sarriette- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/SU/6'</div><div>Description: 'Scellé Marv- Sauge- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/TH/6'</div><div>Description: 'Scellé Marv- Thym- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/FE/6'</div><div>Description: 'Scellé Marv- Fenouil- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/CO/6'</div><div>Description: 'Scellé Marv- Coriandre- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/CB/6'</div><div>Description: 'Scellé Marv- Ciboulette- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/BV/6'</div><div>Description: 'Scellé Marvini- Basilic- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/BP/6'</div><div>Description: 'Scellé Marv- Basil Pourp- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/AN/6'</div><div>Description: 'Scellé Marv- Aneth- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/RO/6'</div><div>Description: 'Scellé Marv- Romarin- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HSM/MN/6'</div><div>Description: 'Scellé Marv- Menthe- 6u'</div></div>", "group": "3" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC5S/BV/6'</div><div>Description: 'Clam Marv- 5 Saveurs- Basilic authentiqu'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/CB/6'</div><div>Description: 'Clam Marv- Ciboulette- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCMGBP4/6'</div><div>Description: 'Marv- Gourmet- Basilic Pourpre'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/CO/6'</div><div>Description: 'Clam Marv- Coriandre- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/ES/6'</div><div>Description: 'Clam Marv- Estragon- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/MN/6'</div><div>Description: 'Clam Marv- Menthe- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCMGBA4/6'</div><div>Description: 'Marv- Gourmet- Basilic L Authe'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC5S/BT/6'</div><div>Description: 'Clam Marv- 5 Saveurs- Basilic Thai'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC5S/BP/6'</div><div>Description: 'Clam Marv- 5 Saveurs- Basilic pourpre'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC5S/BGV/6'</div><div>Description: 'Clam Marv- 5 saveurs- Le Grand vert'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC5S/BC/6'</div><div>Description: 'Clam Marv- 5 Saveurs- Basilic citron'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/BV/6'</div><div>Description: 'Clam Marv- Basilic- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/AN/6'</div><div>Description: 'Clam Marv- Aneth- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/PF/6'</div><div>Description: 'Clamshell marvini Persil frisé 6 un.'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/PI/6'</div><div>Description: 'Clamshell marvini Persil Italien 6 un.'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/LR/6'</div><div>Description: 'Clam Marv- Laurier- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/ML/6'</div><div>Description: 'Clam Marv- Mélisse- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCMGBC4/6'</div><div>Description: 'Marv- Gourmet- Basilic Citron '</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCMGBT4/6'</div><div>Description: 'Marv- Gourmet- Basilic Thaï 4b'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/SU/6'</div><div>Description: 'Clam Marv- Sauge- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/TH/6'</div><div>Description: 'Clam Marv- Thym- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/SR/6'</div><div>Description: 'Clam Marv- Sarriette- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/RO/6'</div><div>Description: 'Clam Marv- Romarin- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/OS/6'</div><div>Description: 'Clam Marv- Oseille- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/OR/6'</div><div>Description: 'Clam Marv- Origan- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/MR/6'</div><div>Description: 'Clam Marv- Marjolaine- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/FE/6'</div><div>Description: 'Clam Marv- Fenouil- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCMGGV4/6'</div><div>Description: 'Marv- Gourmet- Basilic Grand V'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCM/CE/6'</div><div>Description: 'Clam Marv- Cerfeuil- 6u'</div></div>", "group": "4" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCS/BC/6'</div><div>Description: 'Clamshell Sensation Basilic Citron 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCS/BN/6'</div><div>Description: 'Clamshell Sensation Basilic Nufar 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/LA10/6'</div><div>Description: 'Clam Compl- Laurier 10g/6un'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/CE10/6'</div><div>Description: 'Clam Compl- Cerfeuil 10g/6un'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCS/BTR/6'</div><div>Description: 'Clam Compl- Sens- Basilic Trop'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCCMF10/6'</div><div>Description: 'Mélange pour poisson 10g'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/MR10/6'</div><div>Description: 'Clam Compl- Marjolaine 10g/6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/OS10/6'</div><div>Description: 'Clam Compl- Oseille 10g/6un'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/SR10/6'</div><div>Description: 'Clam Compl- Sariette 10/6un'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCS/BP/6'</div><div>Description: 'Clamshell Sensation Basilic Pourpre 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCCMR10/6'</div><div>Description: 'Mélange pour ragoût 10g'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCCMV10/6'</div><div>Description: 'Mélange pour volaille 10g'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCCMP10/6'</div><div>Description: 'Mélange pour pâtes 10g'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCS/BT/6'</div><div>Description: 'Clamshell Sensation Basilic Thai 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/ML10/6'</div><div>Description: 'Clam Compl- Mélisse 10g/6un'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/MN/6'</div><div>Description: 'Clam Compl- Menthe- 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/A2/12'</div><div>Description: 'Clam Compl- Assor#2- 12u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/SR/6'</div><div>Description: 'Clam Compl- Sarriette- 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/TH/6'</div><div>Description: 'Clam Compl- Thym- 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/SU/6'</div><div>Description: 'Clam Compl- Sauge- 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/RO/6'</div><div>Description: 'Clam Compl- Romarin- 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/PI/6'</div><div>Description: 'Clam Compl- Persil Ital- 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/OR/6'</div><div>Description: 'Clam Compl- Origan- 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/LR/6'</div><div>Description: 'Clam Compl- Laurier- 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/ES/6'</div><div>Description: 'Clam Compl- Estragon- 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/CO/6'</div><div>Description: 'Clam Compl- Coriandre- 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/CB/6'</div><div>Description: 'Clam Compl- Ciboulette- 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/BV/6'</div><div>Description: 'Clam Compl- Basilic- 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/AN/6'</div><div>Description: 'Clam Compl- Aneth- 6u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HCC/A1/12'</div><div>Description: 'Clam Compl- Assor#1- 12u'</div></div>", "group": "5" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC4/CB/6'</div><div>Description: 'Clam Provigo- Ciboulette- 6u'</div></div>", "group": "6" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC4/CO/6'</div><div>Description: 'Clam Provigo- Coriandre- 6u'</div></div>", "group": "6" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC4/ES/6'</div><div>Description: 'Clam Provigo- Estragon- 6u'</div></div>", "group": "6" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC4/OR/6'</div><div>Description: 'Clam Provigo- Origan- 6u'</div></div>", "group": "6" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC4/SU/6'</div><div>Description: 'Clam Provigo- Sauge- 6u'</div></div>", "group": "6" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC4/MN/6'</div><div>Description: 'Clam Provigo- Menthe- 6u'</div></div>", "group": "6" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC4/MR/6'</div><div>Description: 'Clam Provigo- Marjolaine- 6u'</div></div>", "group": "6" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC4/LR/6'</div><div>Description: 'Clam Provigo-Laurier 6 unites'</div></div>", "group": "6" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC4/BV/6'</div><div>Description: 'Clam Provigo- Basilic- 6u'</div></div>", "group": "6" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC4/SR/6'</div><div>Description: 'Clam Provigo- Sarriette- 6u'</div></div>", "group": "6" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC4/TH/6'</div><div>Description: 'Clam Provigo- Thym- 6u'</div></div>", "group": "6" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC4/AN/6'</div><div>Description: 'Clam provigo- Aneth- 6u'</div></div>", "group": "6" },{ "html": "<div style='padding: 1px;'><div>Code: 'HC4/RO/6'</div><div>Description: 'Clam Provigo- Romarin- 6u'</div></div>", "group": "6" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/BN/1'</div><div>Description: 'Non emb- Basilic Nufar- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/BPT/1'</div><div>Description: 'Non emb- Basilic Pour- transf-'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/FE/1'</div><div>Description: 'Non emb- Fenouil- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/AN/1'</div><div>Description: 'Non emb- Aneth- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/CO/1'</div><div>Description: 'Non emb- Coriandre- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/CE/1'</div><div>Description: 'Non emb- Cerfeuil- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/ML/1'</div><div>Description: 'Non emb- Mélisse- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/BC/1'</div><div>Description: 'Non emb- Basilic citron- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/RT/1'</div><div>Description: 'Non emb- Romarin Transf- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/TT/1'</div><div>Description: 'Non emb- Thym Transf- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/OT/1'</div><div>Description: 'Non emb- Origan Transf- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/PI/1'</div><div>Description: 'Non emb- Persil Ital- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/CCT/1'</div><div>Description: 'Non emb- Coriandre Transf- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/MN/1'</div><div>Description: 'Non emb- Menthe- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/BVT/1'</div><div>Description: 'Non emb- Basilic Transf- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/ES/1'</div><div>Description: 'Non emb- Estragon- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/RO/1'</div><div>Description: 'Non emb- Romarin- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/OR/1'</div><div>Description: 'Non emb- Origan- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/PF/1'</div><div>Description: 'Non emb- Persil- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/OS/1'</div><div>Description: 'Non emb- Oseille- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/CB/1'</div><div>Description: 'Non emb- Ciboulette- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/MR/1'</div><div>Description: 'Non emb- Marjolaine- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/BT/1'</div><div>Description: 'Non emb- Basilic Thai- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/BP/1'</div><div>Description: 'Non emb- Basil Pourp- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/BV/1'</div><div>Description: 'Non emb- Basilic- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/TH/1'</div><div>Description: 'Non emb- Thym- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/SR/1'</div><div>Description: 'Non emb- Sarriette- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/SU/1'</div><div>Description: 'Non emb- Sauge- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/LR/1'</div><div>Description: 'Non emb- Laurier- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'HKG/AT/1'</div><div>Description: 'Non emb- Aneth Transf- 1kg'</div></div>", "group": "7" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGKADZ/2'</div><div>Description: 'KALE / 2 DZ'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGBTACDZ/1'</div><div>Description: 'Bette à Carde Arc-en-ciel non '</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGBTVEDZ/1'</div><div>Description: 'Bette à Carde Verte emballée -'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGCOE/6'</div><div>Description: 'Coriandre emballée /6 un'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGBTRDZ/1'</div><div>Description: 'Bette à Carde Rouge non emball'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGBBCLB/30'</div><div>Description: 'Gros Bok Choy- 30lb'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGTCLB/5'</div><div>Description: 'Toy Choy (Bok Choy Tips) - 5 l'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGSHTDZ/1'</div><div>Description: 'Shangai tips - 1dz'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGBCTDZ/1'</div><div>Description: 'Bok Choy Tips -1dz'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGCILB/10'</div><div>Description: 'Citronelle non emballée - 10 l'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGKAE/6'</div><div>Description: 'Kale emballé - 6 unités'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGCHFRDZ/1'</div><div>Description: 'Chou Frisé/Kale non emb. - 1dz '</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGAC/10'</div><div>Description: 'Aubergines Chinoises - 10 lbs'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGBTVDZ/2'</div><div>Description: 'Bette à Carde Verte non emball'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGBTVDZ/1'</div><div>Description: 'Bette à Carde Verte non emball'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGBKLB/30'</div><div>Description: 'Mini Bok Choy non emballée - 3'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGBKLB/10'</div><div>Description: 'Mini Bok Choy non emballé - 1'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGAC/20'</div><div>Description: 'Aubergines Chinoises - 20lbs'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGNAE/6'</div><div>Description: 'Mini Nappa emballée - 6 unités'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGBOLB/20'</div><div>Description: 'Bonsaï Choy (Shangai Tips) non'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGTCLB/10'</div><div>Description: 'Toy Choy (Bok Choy Tips) - 10 '</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGSHADZ/1'</div><div>Description: 'Shangai - 1dz'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGTCLB/20'</div><div>Description: 'Toy Choy (Bok Choy Tips) - 20 '</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGTCKG/1'</div><div>Description: 'Toy Choy (Bok Choy tips) - kil'</div></div>", "group": "8" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGTPFC/6'</div><div>Description: 'Tête de Persil frisée - 6 unit'</div></div>", "group": "9" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGTBAC/6'</div><div>Description: 'Tête de basilic vert - 6 unité'</div></div>", "group": "9" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGTPPC/6'</div><div>Description: 'Tête de persil plat - 6 unités'</div></div>", "group": "9" },{ "html": "<div style='padding: 1px;'><div>Code: 'H42/BV/12'</div><div>Description: 'Emb 42g- Basilic- 12u'</div></div>", "group": "9" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGTCOC/6'</div><div>Description: 'Tête de coriandre - 6 unités'</div></div>", "group": "9" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGMBCC/6'</div><div>Description: 'Bébé bette à carde rouge - 6 u'</div></div>", "group": "9" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGBCJCL/454'</div><div>Description: 'Shangai- Bonsai Choy Tips Clam'</div></div>", "group": "11" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGTCJCL/454'</div><div>Description: 'Toy Choy Junior Clam 454g/6'</div></div>", "group": "11" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGTCJCL/6'</div><div>Description: 'Toy Choy Junior Clam 227g/6'</div></div>", "group": "11" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGCIE/6'</div><div>Description: 'Citronelle emballée - 6 unités'</div></div>", "group": "11" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGBCJCL/6'</div><div>Description: 'Bonsai Choy Junior Clam 227g/6'</div></div>", "group": "11" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGBCRCL/6'</div><div>Description: 'Mini Bette à Cardes Rouges Cla'</div></div>", "group": "11" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGBCVCL/6'</div><div>Description: 'Mini Bette à Cardes Vertes Cla'</div></div>", "group": "11" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGCFKCL/6'</div><div>Description: 'Chou Frisé Kale Clam 227g/6'</div></div>", "group": "11" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGDPCL/6'</div><div>Description: 'Duo pack Bonsai/Toy Choy Clam '</div></div>", "group": "11" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGMBCCL/6'</div><div>Description: 'Mini Bok Choy Clam 2-3un./6'</div></div>", "group": "11" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGMNCL/6'</div><div>Description: 'Mini Napa Clam 2-3un./6'</div></div>", "group": "11" },{ "html": "<div style='padding: 1px;'><div>Code: 'LGSECL/6'</div><div>Description: 'Sauté Exotique Clam 400g/6'</div></div>", "group": "11" },{ "html": "<div style='padding: 1px;'><div>Code: 'PPT/RO/6'</div><div>Description: 'Pesto Rosso- 142g- 6un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PPT/TA/6'</div><div>Description: 'Pesto Thai- 142g- 6un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PPT/BO/6'</div><div>Description: 'Pesto Bombay- 142g- 6un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'P250/PR/12'</div><div>Description: 'Seau- Pesto Prov- Bouras. 3Kg'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTU/CI/6'</div><div>Description: 'Citronelle fraîche broyée- 115'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PKG/RO/5'</div><div>Description: 'Pesto Rosso- 5kg'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PPT/AZ/6'</div><div>Description: 'Pesto Azteca- 142g- 6un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTK/BV/2'</div><div>Description: 'Basilic frais broyé- 500g- 2un.'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTK/CI/2'</div><div>Description: 'Citronelle fraiche broyée- 500g 2 un.'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTK/CO/2'</div><div>Description: 'Coriandre fraiche broyée- 500g- 2 un.'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PPT/PR/6'</div><div>Description: 'Pesto Provenzale- 142g- 6un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PPT/ME/6'</div><div>Description: 'Pesto Mediterrannea- 142g- 6un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PKG/TR/1'</div><div>Description: 'Pesto Trad- 1 kg'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTU/AG/6'</div><div>Description: 'Ail grillé broyé- 115g- 6un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTU/AN/6'</div><div>Description: 'Aneth frais broyé- 115g- 6un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTU/BV/6'</div><div>Description: 'Basilic frais broyé- 115g- 6un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTU/CO/6'</div><div>Description: 'Coriandre fraîche broyée- 115g- 6 un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTU/GI/6'</div><div>Description: 'Gingembre frais broyé- 115g- 6 un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTU/IT/6'</div><div>Description: 'Herbes à l italienne- 115g- 6un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTU/OR/6'</div><div>Description: 'Origan frais broyé- 115g- 6un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTU/PG/6'</div><div>Description: 'Piments forts grillés broyés- 115 g- 6'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTU/PI/6'</div><div>Description: 'Persil frais broyé- 115g- 6 un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PPK/PR/3'</div><div>Description: 'Pesto Provenzale- kg- 3un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PPK/RO/3'</div><div>Description: 'Pesto Rosso- kg- 3un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTK/IT/2'</div><div>Description: 'Herbes à l Ital. broyées- 500g'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PKG/TR/20'</div><div>Description: 'Pesto Trad- 20 kg'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PKG/TR/5'</div><div>Description: 'Pesto Trad- 5kg'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PKG/TR/4'</div><div>Description: 'Pesto Trad. 4kg'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PKG/PR/5'</div><div>Description: 'Pesto Prov- 5kg'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PKG/RO/1'</div><div>Description: 'Pesto Rosso 1 kg'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PKG/RO/3'</div><div>Description: 'Pesto Rosso- 3kg'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'P250/RO/12'</div><div>Description: 'Seau- Pesto Rosso- Bouras. 3Kg'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'P250/TR/12'</div><div>Description: 'Seau- Pesto Trad- Bouras. 3Kg'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTK/MN/2'</div><div>Description: 'Menthe fraiche broyée- 500g- 2'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PKG/PR/1'</div><div>Description: 'Pesto Prov- 1 kg'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTK/OR/2'</div><div>Description: 'Origan frais broyé- 500g- 2un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PPK/TR/3'</div><div>Description: 'Pesto Tradizionale- kg- 3un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTK/AG/2'</div><div>Description: 'Ail grillé broyé- 500g- 2un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTK/AN/2'</div><div>Description: 'Aneth frais broyé- 500g- 2un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTK/GI/2'</div><div>Description: 'Gingembre frais broyé- 500g- 2'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTK/RO/2'</div><div>Description: 'Romarin frais broyé- 500g- 2un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTK/PI/2'</div><div>Description: 'Persil frais broyé- 500g- 2un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PKG/TR/3'</div><div>Description: 'Pesto Trad- 3kg'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PTK/PG/2'</div><div>Description: 'Piments forts grillés- 500g- 2'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PPT/TR/6'</div><div>Description: 'Pesto Tradizionale- 142g- 6un'</div></div>", "group": "12" },{ "html": "<div style='padding: 1px;'><div>Code: 'PKG/PR/3'</div><div>Description: 'Pesto Prov- 3 kg'</div></div>", "group": "12" }]


    claudegel
    Participant

    Yes my url is pointing to another php script that send back the correct data. I already have three other dropdownlist in my page getting there data from the same url and they are working perfectly. I know that my data is sent properly.
    I’m sending a request for field1, field2 and field3 and I get back
    [{“html”:”<div style=’padding: 1px;’><div>Code: field1</div><div>Description: field2</div></div>”,”group”:”field3″},…

    my other dropdownlist are regular one or Checkboxes. the one that I have problem is with Categories. is it possible that a Categories dropdownlist cannot get the data from an url php engine and must read his data from a file. all your exemple are fetching data from a file

    So I’ve changed this in my php engine

    remove: echo $result; // that is sending back the query result
    add:`$myfile = fopen(“/tmp/data.txt”, “w”);
    fwrite($myfile, $result);
    fclose($myfile);`

    now the data is in a file and I’ve pointed the url to that page, url: “data.txt”
    I’ll check if it work this way and let you know


    claudegel
    Participant

    Hi Dimitar, in your fiddle you have the same problem. You set

    $(“#date”).jqxDateTimeInput(‘setRange’, “2015-01-15”, “2015-01-17″);

    but on the right side the datetimeinput show 2015-01-14 – 2015-01-16

    for localization I have:

    <script type=”text/javascript” src=”../java/jqwidgets-3.6/jqwidgets/globalization/globalize.js”></script>
    <script type=”text/javascript” src=”../java/jqwidgets-3.6/jqwidgets/globalization/globalize.culture.fr-FR.js”></script>

    On the server the locale is like this

    LANG=fr_CA.UTF-8
    LC_CTYPE=”fr_CA.UTF-8″
    LC_NUMERIC=”fr_CA.UTF-8″
    LC_TIME=”fr_CA.UTF-8″
    LC_COLLATE=”fr_CA.UTF-8″
    LC_MONETARY=”fr_CA.UTF-8″
    LC_MESSAGES=”fr_CA.UTF-8″
    LC_PAPER=”fr_CA.UTF-8″
    LC_NAME=”fr_CA.UTF-8″
    LC_ADDRESS=”fr_CA.UTF-8″
    LC_TELEPHONE=”fr_CA.UTF-8″
    LC_MEASUREMENT=”fr_CA.UTF-8″
    LC_IDENTIFICATION=”fr_CA.UTF-8″
    LC_ALL=

    I’ve tryed to switch to
    <script type=”text/javascript” src=”../java/jqwidgets-3.6/jqwidgets/globalization/globalize.culture.en-CA.js”></script>
    but it didn’t change anything. I’m still one day back in the datetimefield

    in my server php.ini I have date.timezone = “America/Montreal”
    I’ve accessed the page from many browser on the network and all of them are a day late


    claudegel
    Participant

    Ok I’ve modified my php engine so it return the data like this:

    [{"html":"<div style='padding: 1px;'><div>Code: HNE/MR/12</div><div>Description: Non emb, Marjolaine, 12u</div></div>","group":"1"},{"html":"<div style='padding: 1px;'><div>Code: HNE/OR/12</div><div>Description: Non emb, Origan, 12u</div></div>","group":"1"},{"html":"<div style='padding: 1px;'><div>Code: HNE/MN/12</div><div>Description: Non emb, Menthe,  12u</div></div>","group":"1"},{"html":"<div style='padding: 1px;'><div>Code: HNE/ES/12</div><div>Description: Non emb, Estragon, 12u</div></div>","group":"1"},{"html":"<div style='padding: 1px;'><div>Code: HNE/PF/12</div><div>Description: Non emb, Persil frisé 12un</div></div>","group":"1"},
    .....
    ,{"html":"<div style='padding: 1px;'><div>Code: PPT/TR/6</div><div>Description: Pesto Tradizionale, 142g, 6un</div></div>","group":"12"},{"html":"<div style='padding: 1px;'><div>Code: PKG/PR/3</div><div>Description: Pesto Prov, 3 kg</div></div>","group":"12"}]

    Then I change my script like this

    var url = "../moteur/index.php";
    .....
    var prod_code =
    		{
    			datatype: "json",
    	        type:	"POST",
    	        datafields: [
    	           { name: 'html' },
    	           { name: 'group' }
    	        ],
    	        url: url,
    	        async: false,
    	        data: {
    	    		dropdown: true,
    	    		dbase: "inventaire",
    	    		numrow: "*",
    	    		filtre: "groupe > 0 AND actif = 1",
    	    		ordre: "groupe asc",
    	        	field: "code,descrip_fr,groupe"
    	    	}
    	    };
    	var dataAdapter6 = new $.jqx.dataAdapter(prod_code);
    	// Create a jqxDropDownList for product code
        $("#codeprod").jqxDropDownList({
            source: dataAdapter6,
            displayMember: "html",
            valueMember: "group",
            width: 200,
            height: 20,
            selectedIndex: 0,
            //placeHolder: "Sélectionner le produit"
            selectionRenderer: function () {
                var item = $("#codeprod").jqxDropDownList('getSelectedItem');
                if(item){
                    return "<b>" + item.label + "</b>";
                }
                	return "<b>Selectionner le produit:</b>";
            	}
    		});
    
    .....
    
    <div style='float: left;' id='codeprod'></div>

    Is it ok to set the url to a php engine or should I get the data absolutely from a txt file like data.txt
    If yes can I send a request to my php engine so it create a data.txt file with the same json content as above and the set the url to point to my data.txt file

    Now my dropdownlist is empty, no data in it

    thanks


    claudegel
    Participant

    OK I’ve changed my code like this to make a proof

     $(document).ready(function () {
                    // Create a jqxDateTimeInput
                    //get the date 1 and 2 value from php
            -->        var date1 = <?php echo json_encode($date1);?>;
            -->        var date2 = <?php echo json_encode($date2);?>;
                    $("#date1").jqxDateTimeInput({width: "250px", height: "25px", theme: "classic", formatString: "yyyy-MM-dd", selectionMode: "range", showFooter: true, todayString: "Aujourd'hui", enableBrowserBoundsDetection: true});
                    $("#date1").jqxDateTimeInput('setRange', date1, date2);    <--
                    $("#date1").on('change', function (event) {
                        var selection = $("#date1").jqxDateTimeInput('getRange');
                            document.getElementById('debut').value = selection.from.toLocaleDateString();
                        	document.getElementById('fin').value = selection.to.toLocaleDateString();
                    });
    				alert(date1 + "--" + date2);    <--
                });

    the value of $date1 and $date2 are : 2015-03-15 and 2015-03-17
    the value for date1 and date2 in the alert() are 2015-03-15 — 2015-03-17
    But the value shown in the datetimefield are 2015-03-14 and 2015-03-16

    I can send a screen capture if needed
    screen capture of the problem


    claudegel
    Participant

    Ok so if I send a select request to my php engine and return the data from my mysql table in the form you show above it should work. I gonna try and let you know


    claudegel
    Participant

    sorry but I didn’t explain properly. with the above code I can set a range of two date like 2015-01-15 to 2015-01-17
    when I click the second date, 17, the calendar close and I have these value in the input field, 2015-01-15 to 2015-01-17
    but then I send them as POST data to the same page (reload) and populate the datetimefield with the data received from POST
    the start and end date in the datetimefield are offsetted by -1. but the date received are OK
    The form send the 2015-01-15 and 2015-01-17 date and the date received are the same but when I use setRange to reload the datetime field with the received data, the field is offsetted by -1

    $date = date('Y-m-d');
    
      	if (isset($_REQUEST['debut'])){
    		$date1 = $_REQUEST['debut'];
    	}else{
    		$date1 = $date;
    	}
    	if (isset($_REQUEST['fin'])){
    	  	$date2 = $_REQUEST['fin'];
    	}else{
    		$date2 = $date;
    	}
    
      	echo "<form method=post id='date_range' action='$_SERVER[PHP_SELF]'>";
      	echo "<input  id='debut' type='hidden' name='debut' value='' />";
      	echo "<input id='fin' type='hidden' name='fin' value='' />";
    	echo "<table width=755 border=0  bgcolor=#cce7bc cellspacing=0 cellpading=3>";
    
    	echo "<tr><td colspan=2 align=center>Inscrire les dates de début et fin de la période à calculer</td></tr>";
    	echo "<tr>";
    	echo "<td align=center colspan=2>";
    	?>
    	<div id='content'>
    	<script type="text/javascript">
                $(document).ready(function () {
                    // Create a jqxDateTimeInput
                    $("#date1").jqxDateTimeInput({width: "250px", height: "25px", theme: "classic", formatString: "yyyy-MM-dd", selectionMode: "range", showFooter: true, todayString: "Aujourd'hui", enableBrowserBoundsDetection: true});
                    $("#date1").jqxDateTimeInput('setRange', <?php echo json_encode($date1);?>, <?php echo json_encode($date2);?>);
                    $("#date1").on('change', function (event) {
                        var selection = $("#date1").jqxDateTimeInput('getRange');
                            document.getElementById('debut').value = selection.from.toLocaleDateString();
                        	document.getElementById('fin').value = selection.to.toLocaleDateString();
                    });
    
                });
            </script>
    	<?php
    	echo "<div id='date1'></div><i> Pour sélection rapide du mois et de l'année clicquer sur le titre du calendrier</i>";
    	echo "</div>";
    	echo "</td></tr>";
    
    	echo "<tr><td align=center colspan=2>";
    	echo "<input type=submit name='calculer' value='Calculer' />";
    	echo "</td></tr>";
    	echo "</table>";

    $date1 and $date2 are the correct date received via $_REQUEST

    but using

    $("#date1").jqxDateTimeInput('setRange', <?php echo json_encode($date1);?>, <?php echo json_encode($date2);?>);

    to fill the datetime field give a start and end date offsetted by -1
    I can solve it by adding 1 day to the $date1 and $date2 but it’s really strange

    I’m using the latest jQWidgets (3.6.0).

    Thanks


    claudegel
    Participant

    Ok it work like this:
    I’d to first uncheckall before using checkitem

    $("#spec_list").jqxDropDownList('uncheckAll');
                               var check = dataRecord.probleme;
                               var checkit = check.split(",");
                               for (i = 0; i < checkit.length; i++) {
                            	   $("#spec_list").jqxDropDownList('checkItem', checkit[i]);
                               }

    maybe I can use directly
    var checkit = dataRecord.probleme.split(",");


    claudegel
    Participant

    Here is my script

    <!DOCTYPE html>
    <?php
    include "../../db-local.php";  //validation usager
    ?>
    
    <html lang="fr">
    <head>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
      <link rel="stylesheet" href="../../css/form.css" type="text/css" />
      <link rel="stylesheet" href="../../java/jqwidgets-3.6/jqwidgets/styles/jqx.base.css" type="text/css" />
      <link rel="stylesheet" href="../../java/jqwidgets-3.6/jqwidgets/styles/jqx.classic.css" type="text/css" />
      <script type="text/javascript" src="../../java/jquery-1.11/jquery-1.11.2.min.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxcore.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxbuttons.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxscrollbar.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxmenu.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxcheckbox.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxlistbox.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxdropdownlist.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxgrid.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxgrid.selection.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxgrid.edit.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxgrid.export.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxdata.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxwindow.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxinput.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxnumberinput.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxtooltip.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxdatetimeinput.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/jqxcalendar.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/globalization/globalize.js"></script>
      <script type="text/javascript" src="../../java/jqwidgets-3.6/jqwidgets/globalization/globalize.culture.fr-FR.js"></script>
      
    <script type="text/javascript">
    
    $(document).ready(function () {
    	//initialiser les boutons du bas de page
    	$("#Termine").jqxButton({ disabled: true, width: '80', height: '20', theme: 'classic'});
    	$("#Suivant").jqxButton({ disabled: true, width: '80', height: '20', theme: 'classic'});
    	$("#Pause").jqxButton({ disabled: true, width: '80', height: '20', theme: 'classic'});
    	$("#Annule").jqxButton({ disabled: true, width: '80', height: '20', theme: 'classic'});
    	//initialiser une ligne de la grille
    	var generaterow = function (i) {
            var row = {};
            row["no_facture"] = "0";
            row["code_prod"] = "-";
            row["qtt"] = "0";
            row["descrip"] = "-";
            row["no_lot"] = "-";
            return row;
        }
        
    	//adresse du moteur de recherche et autre constantes
        var url = "../moteur/index.php";
        var resp = 9;
        var table_form = "q_exp_f_04";
        var ficheno = 169;
        
        //selectionner la date
    	$("#jqxdate").jqxDateTimeInput({
    		theme: 'classic',
    		width: '150px',
    		height: '25px',
    		showCalendarButton: true,
    		formatString: 'yyyy-MM-dd',
    		culture: 'fr-FR',
    		showFooter:true,
    		todayString: "Aujourd'hui",
    		clearString: 'Effacer',
    		});
    	var ladate = $('#jqxdate').jqxDateTimeInput('getText');
    	
    	//selectionner le numero de formulaire
    	var source_form =
    		{
    			datatype: "json",
                type:	"POST",
                datafields: [
                    { name: 'AUTO_INCREMENT' }
                ],
                url: url,
                async: false,
                data: {
            		select: true,
            		dbase: "information_schema.tables",
            		numrow: "1",
            		filtre: "table_name = 'formadmin' AND table_schema = DATABASE( )",
            		ordre: "-",
                	field: "AUTO_INCREMENT"
            	}
    		};
    	var dataAdapter3 = new $.jqx.dataAdapter(source_form, {
    		loadComplete: function (records){},
    	});
    	dataAdapter3.dataBind();
    	var form_no = dataAdapter3.records[0].AUTO_INCREMENT;
    	$('#formulaire').html("Formulaire no: " + form_no);
    	
        
        // prepare le data pour liste des clients
        var source =
            {
                datatype: "json",
                type:	"POST",
                datafields: [
                    { name: 'nocli' },
                    { name: 'nom' }
                ],
                url: url,
                async: false,
                data: {
            		select: true,
            		dbase: "client",
            		numrow: "*",
            		filtre: "-",
            		ordre: "nom desc",
                	field: "nom,nocli"
            	}
            };
            var dataAdapter = new $.jqx.dataAdapter(source);
    
            // Creer une jqxDropDownList des clients
            $("#jqxWidget").jqxDropDownList({
                source: dataAdapter,
                displayMember: "nom",
                valueMember: "nocli",
                width: 300,
                height: 25,
                placeHolder: "Choisir le client"
            });
    
    		//liste des formulaires ouverts
            var source_actif =
            {
                datatype: "json",
                type:	"POST",
                datafields: [
                    { name: 'form_no' },
                    { name: 'date_actif' }
                ],
                url: url,
                async: false,
                data: {
            		select: true,
            		dbase: "formadmin",
            		numrow: "*",
            		filtre: "ficheno=169 AND complet=0 AND conforme=-1",
            		ordre: "form_no asc",
                	field: "form_no,concat(form_no,'-',date_actif) as liste"
            	}
            };
            var dataAdapter4 = new $.jqx.dataAdapter(source_actif);
    
            // Creer une jqxDropDownList des clients
            $("#open_list").jqxDropDownList({
                source: dataAdapter4,
                displayMember: "form_no",
                valueMember: "form_no",
                width: 260,
                height: 25,
                placeHolder: "Choisir le formulaire à terminer"
            });
    
            // recharger la grille avec les valeurs du formulaire
            $("#open_list").on('select', function (event)
            		{
        				//rouver le numero du formulaire
    					var formno = event.args.item.value;
    					// desactiver les autre liste
    					$("#jqxWidget").jqxDropDownList({ disabled: true });
    					$("#open_list").jqxDropDownList({ disabled: true });
    					$('#jqxdate').jqxDateTimeInput({disabled: true});
    					//var commit = $("#jqxgrid").jqxGrid('reload', formno);
            		});
            // Initialiser la fenetre popup
           // $("#lepopup").jqxWindow('hide');
           
            // prepare la grille qui s'affiche si on selectionne un item de la liste
            $("#jqxWidget").on('select', function (event)
            		{
            			// get client's ID.
            		  var nocli = event.args.item.value;
    					// deuxieme dataadapter pour la grille
            		  $("#jqxWidget").jqxDropDownList({ disabled: true });
            		  $("#open_list").jqxDropDownList({ disabled: true });
            		  
          			  var source2 =
           				 {
              				  datatype: "json",
               				  type:	"POST",
                			  datafields: [
                   				 { name: 'nocli' },
                   				 { name: 'date' },
                   				 { name: 'row' },
                  				 { name: 'no_facture' },
                   				 { name: 'code_prod' },
                    			 { name: 'qtt' },
                   				 { name: 'descrip' },
                   				 { name: 'no_lot' },
                   				 { name: 'no_retour'}
                			  ],
                			  url: url,
               				  async: false,
               				  //ajouter un rang vide
               				  addrow: function (rowid, rowdata, position, commit) {
    							// ajouter une ligne a la base de donnees
        						var data = "insert=true&dbase=" + table_form + "&nocli=" + nocli + "&date=" + ladate + "&formno=" + form_no + "&row=" + rowid + "&cause=0&" + $.param(rowdata);
    								$.ajax({
    	                                  dataType: 'json',
    	                                  url: '../moteur/index.php',
    	                                  type:	"POST",
    	                                  data: data,
                 				          cache: false,
    	                                  success: function (data, status, xhr) {
    	                                      // insert command is executed.
    	                                	  $("#Termine").jqxButton({disabled: false});
    	                                	  $("#Suivant").jqxButton({disabled: false});
    	                                	  $("#Pause").jqxButton({disabled: false});
    	                                	  $("#Annule").jqxButton({disabled: false});
    	                                	  $('#jqxdate').jqxDateTimeInput({disabled: true});
    	                                      commit(true);
    	                                  },
    	                                  error: function (jqXHR, textStatus, errorThrown) {
    	                                      // cancel changes.
    	                                      commit(false);
    	                                  }
    	                              });
               				  },
               				  updaterow: function (rowid, rowdata, commit) {
                  				// changer les donnees d'une ligne dans la base de donnees
                 				  var selectedrow = $('#jqxgrid').jqxGrid('selectedrowindex');
                                  var filtre = "formno=" + form_no + " AND row=" + $('#jqxgrid').jqxGrid('getrowid',selectedrow);
    							  var data = "update=true&dbase=" + table_form + "&filtre=" + filtre + "&" + $.param(rowdata);
    							  							  
                                  $.ajax({
                                      dataType: 'json',
                                      url: '../moteur/index.php',
                                      type:	"POST",
                                      data: data,
                                      cache: false,
                                      success: function (data, status, xhr) {
                                          // insert command is executed.
                                          commit(true);
                                      },
                                      error: function (jqXHR, textStatus, errorThrown) {
                                          // cancel changes.
                                          commit(false);
                                      }
                                  });
                      		  },
              				  deleterow: function (rowid, commit) {
                  				//effacer une ligne de la base de donnees
                				var filtre = "formno=" + form_no + " AND row=" + rowid;
                  				var data = "delete=true&dbase=" + table_form + "&filtre=" + filtre;
                  				
              					$.ajax({
                                    dataType: 'json',
                                    url: '../moteur/index.php',
                                    type:	"POST",
                                    data: data,
                                    success: function (data, status, xhr) {
                                        // insert command is executed.
                                        commit(true);
                                    },
                                    error: function (jqXHR, textStatus, errorThrown) {
                                        // cancel changes.
                                        commit(true);
                                    }
                                });
              				  }
            			};
    					var dataAdapter2 = new $.jqx.dataAdapter(source2);
    					
            			// initializer les champs du questionnaire.
                      $("#nofacture").jqxInput({ theme: 'classic', width: 150, height: 23 });
                      $("#nolot").jqxInput({ theme: 'classic', width: 150, height: 23 });
                      $("#codeprod").jqxInput({ theme: 'classic', width: 150, height: 23 });
                      $("#quantite").jqxInput({ theme: 'classic', width: 150, height: 23 });
                      $("#cause").jqxInput({ theme: 'classic', width: 250, height: 23 });
    
             			
             			var editrow = 0;
             			
       					// initialiser la grille des items retournes
       					$("#jqxgrid").jqxGrid({
       					width: 800,
       					columns: [
       	                  { text: 'No Facture', dataField: 'no_facture', width: 80 },
       	                  { text: 'No Lot', dataField: 'no_lot', width: 60 },
       	                  { text: 'Code Produit', dataField: 'code_prod', width: 90 },
       	                  { text: 'Quantite', dataField: 'qtt', width: 70 },
       	                  { text: 'Cause', dataField: 'descrip', width: 450 },
          	              { text: 'Editer', datafield: 'Edit', width: 50, columntype: 'button', cellsrenderer: function () {
                               return "Editer";
                               },
                               buttonclick: function (row) {
                               // open the popup window when the user clicks a button.
                               editrow = row;
                               var offset = $("#jqxgrid").offset();
                               $("#lepopup").jqxWindow({ position: { x: parseInt(offset.left) + 80, y: parseInt(offset.top) + 80 } });
                               // get the clicked row's data and initialize the input fields.
                               var dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow);
                               $("#nofacture").val(dataRecord.no_facture);
                               $("#nolot").val(dataRecord.no_lot);
                               $("#codeprod").val(dataRecord.code_prod);
                               //$("#quantite").jqxNumberInput({ decimal: dataRecord.qtt});
                               $("#quantite").val(dataRecord.qtt);
                               $("#cause").val(dataRecord.descrip);
                               // show the popup window.
                               $("#lepopup").jqxWindow('open');
                           	   }
                           }
       	              	 ],
       					source: dataAdapter2
       	   				});
       	   				//traduction
       					var localizationobj = {};
       					localizationobj.emptydatastring = "Aucune donnée disponible";
       					$("#jqxgrid").jqxGrid('localizestrings', localizationobj);
       	   				//colonne invisible
       					$('#jqxgrid').jqxGrid('hidecolumn', 'no_retour');
       					$('#jqxgrid').jqxGrid('hidecolumn', 'row');
       					$('#jqxgrid').jqxGrid('hidecolumn', 'date');
       					
         	 			 // initialiser la fenetre d'edition .
            			$("#lepopup").jqxWindow({
             				width: 370, resizable: true,  isModal: true, autoOpen: false, cancelButton: $("#Cancel"), modalOpacity: 0.01
            			});
            			$("#lepopup").on('open', function () {
               				$("#nofacture").jqxInput('selectAll');
           				});
         
            			$("#Cancel").jqxButton({ theme: 'classic' });
            			$("#Save").jqxButton({ theme: 'classic' });
            			// update the edited row when the user clicks the 'Save' button.
            			$("#Save").click(function () {
                			if (editrow >= 0) {
                				//var selectedrow = $('#jqxgrid').jqxGrid('selectedrowindex');
                    			var row = { no_facture: $("#nofacture").val(), no_lot: $("#nolot").val(), code_prod: $("#codeprod").val(),
                       		 		qtt: $("#quantite").val(), descrip: $("#cause").val(), date: ladate
                    			};
                    			var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow);
                    			$('#jqxgrid').jqxGrid('updaterow', rowID, row);
                    			$("#lepopup").jqxWindow('hide');
                			}
            			});
        		});
    		
            	$('#addrowbutton').click(function () {
                	// trouver combien de rang sont present dans la grille
            		var datainformations = $("#jqxgrid").jqxGrid("getdatainformation");
            		var rowscounts = datainformations.rowscount;
           		 // creer nouveau rang dans la grille.
                    var datarow = generaterow();
                    var row_id = $("#jqxgrid").jqxGrid('getrowid',rowscounts+1);
                    $("#jqxgrid").jqxGrid('addrow', row_id, datarow);
            	});
    
            	$("#deleterowbutton").bind('click', function () {
                    var selectedrowindex = $("#jqxgrid").jqxGrid('getselectedrowindex');
                    var rowscount = $("#jqxgrid").jqxGrid('getdatainformation').rowscount;
                    if (selectedrowindex >= 0 && selectedrowindex < rowscount) {
                        var id = $("#jqxgrid").jqxGrid('getrowid', selectedrowindex);
                        var commit = $("#jqxgrid").jqxGrid('deleterow', id);
                    }
                });
    
    			//terminer le formulaire et sauver les donnees
            	$('#Termine').on('click', function () {
    					close_form(form_no,"../menu.php");
                	});
    			//terminer le formulaire, sauver les donnees et en ouvrir un autre
            	$('#Suivant').on('click', function () {
    				close_form(form_no,"./index.php");
            	});
            	
            	//fermeture du formulaire
            	function close_form(form_no,adress)
                {
            		var registre = "<a href=\"show.php?form_no=" + form_no +"\" target=\"retour\"></a>";
            		var data = "insert=true&dbase=formadmin&date_actif=" + ladate + "&ficheno=" + ficheno + "&delais=1&date_retourne=" + ladate + "&complet=1&conforme=0&resp=" + resp + "&source=0&lien=0&qtt_ncr=0&registre=" + registre;
            		
            		$.ajax({
                          dataType: 'json',
                          url: '../moteur/index.php',
                          type:	"POST",
                          data: data,
            		      cache: false,
            		      success: function(data){
    							//alert(data);
            		    	  window.location.href = adress;
            		      },
            		      error: function(){
                		      alert("marche pas");
            		      }
                        });
                }
    
    			//mettre en pause le formulaire pour terminer plutard
            	$('#Pause').on('click', function () {
                	
            		var adress = "../menu.php";
            		var data = "insert=true&dbase=formadmin&date_actif=" + ladate + "&ficheno=" + ficheno + "&delais=1&date_retourne=" + ladate + "&complet=0&conforme=-1&resp=" + resp + "&source=0&lien=0&qtt_ncr=0&registre=''";
            		
            		$.ajax({
                          dataType: 'json',
                          url: '../moteur/index.php',
                          type:	"POST",
                          data: data,
            		      cache: false,
            		      success: function(data){
    							//alert(data);
            		    	  window.location.href = adress;
            		      },
            		      error: function(){
                		      alert("marche pas");
            		      }
                        });
            	});
    
                //annuler tout le formulaire
            	$('#Annule').on('click', function () {
            		var adress = "../menu.php";
            		var filtre = "formno=" + form_no;
      				var data = "delete=true&dbase=" + table_form + "&filtre=" + filtre;
            		
            		$.ajax({
                          dataType: 'json',
                          url: '../moteur/index.php',
                          type:	"POST",
                          data: data,
            		      cache: false,
            		      success: function(data){
            		    	  window.location.href = adress;
            		      },
            		      error: function(){
                		      alert("marche pas");
            		      }
                        });
            	});
            
       });
    </script>
      
    </head>
    <body class="default">
    
    <div class="header">
    <h3><div id="formulaire"></div></h3>
    <p><b>Note:</b> 1- Choisir le client ou choisir un formulaire déjà actif, 2- choisir la date de retour du ou des produit(s), 3- ajouter et compléter chaque ligne du tableau (une par produit)</p>
    </div>
    <br>
    <div class="content">
    <div id="jqxWidget" style="font-size: 13px; font-family: verdana; float: left;">
    <br>
    </div>
     
    <div id="open_list" style"font-size: 13px; font-family: verdana; float: left;">
    <br>
    </div>
    		<div class="date">
    			Date du retour:
    			<div id="jqxdate"></div>
    		</div>
    		
    <br><br><br>
    <div id="jqxgrid"></div>
    <div style="float: left;" id="selectionlog">
    	</div>
    <div id="lepopup">
                
                <div style="overflow: hidden;">
                    <table>
                    <th><td colspan="2" align="center">
                    Compléter la grille
                    </td></th>
                        <tr>
                            <td align="right">No_Facture:</td>
                            <td align="left"><input id="nofacture" /></td>
                        </tr>
                        <tr>
                            <td align="right">No_Lot:</td>
                            <td align="left"><input id="nolot" /></td>
                        </tr>
                        <tr>
                            <td align="right">Code_Produit:</td>
                            <td align="left"><input id="codeprod" /></td>
                        </tr>
                        <tr>
                            <td align="right">Quantité:</td>
                            <td align="left"><input id="quantite"></td>
                        </tr>
                        <tr>
                            <td align="right">Description:</td>
                            <td align="left"><input id="cause"></td>
                        </tr>
                        <tr>
                            <td align="right"></td>
                            <td style="padding-top: 10px;" align="right"><input style="margin-right: 5px;" type="button" id="Save" value="Save" /><input id="Cancel" type="button" value="Cancel" /></td>
                        </tr>
                    </table>
                </div>
    </div>
    		    <input id="addrowbutton" type="button" value="Ajouter" title="Ajouter une ligne au tableau"/>
    			<input id="deleterowbutton" type="button" value="Effacer" title="Effacer la ligne sélectionnée"/>
    </div>
    <br>
    		<div class="footer">
    			<input type="button" value="Terminé" id='Termine' title="Compléter ce formulaire et fermer la fenêtre"/>
    			<input type="button" value="Suivant" id='Suivant' title="Compléter ce formulaire et en ouvrir un autre"/>
    			<input type="button" value="Pause" id='Pause' title="Continuer plus tard"/>
    			<input type="button" value="Anuler" id='Annule' title="Anuler tout le formulaire"/>
    			<p>Les Fines Herbes de Chez Nous Inc.</p>
    	   </div>
    </body>
    </html>

    Thanks,


    claudegel
    Participant

    That’s not giving me any clue. My problem is that when I open the script, the grid is not displayed but the field in the popup window is showing up. I think that normally the popup is under the grid so I dont see it until I use $(“#lepopup”).jqxWindow(‘open’);

    In the example you gave, the grid is already open so the popup windows is masked. In my case the grid is not open as I need to select some data before I open it. So I don’t see a popup window but just all the field it contain (html input). How do I prevent these fields to showup before I open the grid. Or can I open an empty grid to mask these field ?

    in reply to: No data to display No data to display #68164

    claudegel
    Participant

    Thanks,

    var localizationobj = {};
    localizationobj.emptydatastring = “Aucune donnée disponible”;
    $(“#jqxgrid”).jqxGrid(‘localizestrings’, localizationobj);

    work great.


    claudegel
    Participant

    Thanks it work perfectly

    $('#Button5').on('click', function () {
    					close_form(form_no,"../menu.php");
                	});
    
            	$('#Button6').on('click', function () {
    				close_form(form_no,"./index.php");
            	});
            	
            	function close_form(form_no,adress)
                {
            		var registre = "<a href=\"show.php?form_no=" + form_no +"\" target=\"retour\"></a>";
            		var data = "insert=true&dbase=formadmin&date_actif=" + ladate + "&ficheno=169&delais=1&date_retourne=" + ladate + "&complet=1&conforme=0&resp=9&source=0&lien=0&qtt_ncr=0&registre=" + registre;
            		
            		$.ajax({
                          dataType: 'json',
                          url: '../moteur/index.php',
                          type:	"POST",
                          data: data,
            		      cache: false,
            		      success: function(data){
    							//alert(data);
            		    	  window.location.href = adress;
            		      },
            		      error: function(){
                		      alert("no way");
            		      }
                        });
                }
    

    database is updated and page is redirected as needed

    How do I adjust the button text as now the text is not perfectly centered. I want my button to have the same look as the first two button below

    <div>
    <input id="addrowbutton" type="button" value="Ajouter" />
    			<input id="deleterowbutton" type="button" value="Effacer" />
    			<input type="button" value="Terminé" id='Button5' />
    			<input type="button" value="Suivant" id='Button6' />
    </div>

    In the last two button the text is not centered vertically. Also the two last button are not alligned on the same line as the first two. They are a little higher on the line.


    claudegel
    Participant

    sorry better like this

    <a style='margin: 5px;' target="_self" href="../menu.php" id='Button5'>finish</a>
    <a style='margin: 5px;' target="_self" href="./index.php" id='Button6'>next</a>
    

    claudegel
    Participant

    forget to say the two button are set like this:

    finish
    next

    the two button are loading the correct pages but data is not sent

Viewing 15 posts - 1 through 15 (of 23 total)