U
usa-99
Hi there
I have following function which is called on load of page.
function checkFieldContent(form) {
var field;
for(i = 0; i < form.elements.length; i++) {
field = form.elements;
if (field.type == 'text') {
alert(field.name);
// checkSearchInput(field);
}
alert('after');
}
alert('end');
}
Like this it works perfect but as soon as my own function is called ->
checkSearchInput(field); it's only going one time through the loop,
checkSearchInput calls various subfunctions and at the moment does not
return anything. I'm not really into js and confused about when I need
to return true or false on a functions call. I tried it with a return
value (true or false) but it didn't change anything. Of course function
checkSearchInput for itself works without errors...
Thanks a lot for your appreciated help!
sg2923
I have following function which is called on load of page.
function checkFieldContent(form) {
var field;
for(i = 0; i < form.elements.length; i++) {
field = form.elements;
if (field.type == 'text') {
alert(field.name);
// checkSearchInput(field);
}
alert('after');
}
alert('end');
}
Like this it works perfect but as soon as my own function is called ->
checkSearchInput(field); it's only going one time through the loop,
checkSearchInput calls various subfunctions and at the moment does not
return anything. I'm not really into js and confused about when I need
to return true or false on a functions call. I tried it with a return
value (true or false) but it didn't change anything. Of course function
checkSearchInput for itself works without errors...
Thanks a lot for your appreciated help!
sg2923