Electrochromic (EC) thin films of NiOx and NiOxHy are prepared by sol-gel method from nickel chloride precursor and deposited onto a suitable substrate by dip-coating technique. The development of the structure with thermal treatment is investigated by EXAFS and IR spectroscopy in two series of films, with high and low concentration of chloride as counter ions. In the former, the predominant structure before thermal treatment is nickel hydroxide. The baking induces condensation, yet with no trace of NiO. In the latter group, colloidal particles are indicated, on which acetate groups are adsorbed or coordinated. At the maximum EC-response the formation of NiO grains is established by EXAFS and IR.Elektrokromne tanke plasti NiOx in NiOxHy smo pripravili z metodo sol-gel iz nikelj-kloridnega prekurzorja in jih s tehniko potapljanja nanesli na ustrezno podlago. Razvoj strukture s temperaturo obdelave smo spremljali s spektroskopijama EXAFS in IR pri dveh serijah filmov z visoko oz. nizko koncentracijo kloridnih proti-ionov. V prvi pred termično obdelavo prevladuje struktura nikljevega hidroksida. Segrevanje nato izzove kondenzacijo, vendar brez sledov NiO. V drugi seriji so prisotni koloidni delci, na katere so adsorbirane acetatne skupine. Z obema spektroskopskima metodama smo pri plasteh z največjim elektrokromnim odzivom ugotovili prisotnost strukture nikljevega oksida