var f = document.f2;
f.elements[i].options[Math.floor((f.elements[i].length-1)*Math.random())+1].selected=true;
10 gru 2009
var f = document.f2;
f.elements[i].options[Math.floor((f.elements[i].length-1)*Math.random())+1].selected=true;
function sf2() {
var f = document.f2;
for(i=0;i<f.elements.length;i++) {
if(f.elements[i].type=='text')
f.elements[i].value = 'test';
}
}
<input name="fld_katalog" type="text" id="fld_katalog" value="2008_08_14" disabled>
<input name="fld_zmien" type="button" value="Odblokuj" class="przycisk" onclick="this.form.elements['fld_katalog'].disabled = false;">
var fld_cecha_name = "cecha_"+tab_nr+"_"+nr;
fld_cecha = form.elements[fld_cecha_name];
fld_cecha.value = "";
fld_cecha.disabled = false;
var fld_name;
var idx, nr;
cnt = f.elements.length;
for(i=0; i<cnt; i++){
if(f.elements[i].name.indexOf("kwota_budzetu_")!=-1) {
fld_name = f.elements[i].name;
idx = fld_name.lastIndexOf("_")+1;
nr = fld_name.substr(idx);
f.elements["roznica_proj_"+nr].value =
eval(f.elements["kwota_budzetu_"+nr].value) -
eval(f.elements["wartosc_proj_"+nr].value);
}
}