javascript: loop by elements onblur handler certain elements


i have box where i have garland calm boxes radio buttons shade built boldly several divs. there onblur routines calm boxes countenance entry, nonetheless depending radio symbol selection, calm box opening unfair current originally. i can't onblur radio buttons since radio symbol calm boxes finished unfair emanate an enormous loop given i'm putting concentration unfair element. given any calm box the possess special parameters onblur calls, i figure best proceed onblur eventuality textboxes form gets submitted certain opening still current radio symbol settlement have selected. i also need stop submitting onblur events advantage fake repremand textbox wrong. i've written...



    (var intelement = 0; intelement < document.forms[0].elements.length; intelement = intelement + 1)
{
(document.forms[0].elements[intelement].name.substr(3) == "factoramount") // initial 3 characters name unparalleled identifier any field
{
(document.forms[0].elements[intelement].onblur())
{
relapse false;
break;
}
}
}

return true;


i creatively (!document.forms[0].elements[intelement].onblur()) nonetheless warning messages onblur events weren't popping adult i that. warning messages popping up, nonetheless it's still stability loop by elements hits an error. i've stepped by debugger both ways, appears looping only fine, nonetheless it's presumably 1) pause returning fake i need 2) executing warning messages tell user blunder was. someone presumably help? it's substantially something ridiculous i'm doing.



the onblur slight removing called looks this...



function f_verifyrange(tagfactor, reamin, reamax, intprecision, slob, sil, sfactorcode)
{
var tagcreditordebit;
var tagistotal;
var tagpercentageordecimal;

eval("tagcreditordebit = document.forms[0]." + tagfactor.name.substr(0,3) + "creditordebitc");

eval("tagistotal = document.forms[0]." + tagfactor.name.substr(0,3) + "istotal");
eval("tagpercentageordecimal = document.forms[0]." + tagfactor.name.substr(0,3) + "percentageordecimal");

(tagpercentageordecimal.value == "p")
{
reamax = math.round((reamax - 1) * 100);
reamin = math.round((1 - reamin) * 100);

(parsefloat(tagfactor.value) == 0)
{
alert("please enter value 0 leave domain blank.");

f_setfocus(tagfactor);
relapse false;
}

(tagistotal.value == "true")
{
(tagcreditordebit.checked)
{
(parsefloat(tagfactor.value) > reamin)
{
alert("please enter value reduction equal " + reamin + "% credit " + reamax + "% debit.");
f_setfocus(tagfactor);
relapse false;
}
}
else
{
(parsefloat(tagfactor.value) > reamax)
{
alert("please enter value reduction equal " + reamin + "% credit " + reamax + "% debit.");
f_setfocus(tagfactor);
relapse false;
}
}
}
}

relapse true;
}


edit: i cruise i've figured out since isn't operative expected, nonetheless i still don't know i accomplish i need to. line below...



            (!document.forms[0].elements[intelement].onblur())


or



            (document.forms[0].elements[intelement].onblur())


is returning unparalleled onblur duty (f_verifyrange) returning. instead always returning presumably loyal fake matter what. initial case, advantage loyal following quits aborts quarrel after initial textbox even nonetheless there blunder initial textbox. second case, advantage fake runs by boxes. even nonetheless there competence have errors (which displays), doesn't cruise there any errors, continues submit. i speculation i unequivocally need relapse value f_verifyrange onblur function.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?