Re: Form buttons not working (add new, save, delete)
I’ve contacted your support, and that has been hopeless unfortunately. They state they do not have any problem with my code.
Here is the problem!
I’m getting an ajax error (not my function, it is one built by scriptcase):
document.F1.elements[sFieldName].value is undefined
[Break On This Error] return document.F1.elements[sFieldName].value.replace(/[+]/g, “NM_PLUS”);
I’m attaching my php script. The full function that is failing is:
function scAjaxGetFieldText(sFieldName)
{
$oHidden = $(“input[name=” + sFieldName + “]”);
if ($oHidden.length)
{
for (var i = 0; i < $oHidden.length; i++)
{
if (“hidden” == $oHidden[i].type && $oHidden[i].form && $oHidden[i].form.name && “F1” == $oHidden[i].form.name)
{
return $oHidden[i].value.replace(/[+]/g, “NM_PLUS”);
}
}
}
$oField = $("#id_sc_field_" + sFieldName);
if ($oField.length && “select” != $oField[0].type.substr(0, 6))
{
return $oField.val().replace(/[+]/g, “NM_PLUS”);
}
else if (document.F1.elements[sFieldName])
{
return document.F1.elements[sFieldName].value.replace(/[+]/g, “NM_PLUS”);
}
else
{
return ‘’;
}
} // scAjaxGetFieldText
I cannot determine which field is the problem. But this is when I click SAVE and it freezes all of the other buttons.
Anyone have an idea??