Hi,
I have a Javascript function which contains the following condition:
else {
document.forms["prices"].action = '/public/GenericPublicPage?page=careers';
document.forms["prices"].submit();
return true;
}
Based on some testing that I have been doing it seems like the each of the lines
document.forms["prices"].submit();
and
return true;
is causing the action to be submitted (therefore submitting the form twice). I wasn't expecting the "return true;" line to submit the form.
Does anyone know if "return true" automatically causes a form action to be submitted.
Many thanks for any help / suggestions.
I have a Javascript function which contains the following condition:
else {
document.forms["prices"].action = '/public/GenericPublicPage?page=careers';
document.forms["prices"].submit();
return true;
}
Based on some testing that I have been doing it seems like the each of the lines
document.forms["prices"].submit();
and
return true;
is causing the action to be submitted (therefore submitting the form twice). I wasn't expecting the "return true;" line to submit the form.
Does anyone know if "return true" automatically causes a form action to be submitted.
Many thanks for any help / suggestions.