05-03-2023, 04:14 AM
Thank you for the suggestion, but the fact remains that the code in procedure TIWPageContext40.AddToJavaScriptOnce(const ACode: string); has an condition to check if the JavaScript code you want to add is not already present (the comment is mine).
And inside procedure TIWPageContext40.FinalizeContext; is a last line as follows:
which means that I must now ensure that there is no snippet of JavaScript equal to
in the FJavaScript before the FinalizeContext is called.
Which means that for example
would also break the IntraWeb application.
I'm sorry, but I do not believe it's feasible to ask IntraWeb developers to never add the snippet containing " return true;EOL}EOL" using AddToJavaScriptOnce to prevent procedure TIWPageContext40.FinalizeContext from breaking.
Groetjes, Bob Swart
Code:
if Pos(LCode, FJavaScript) <= 0 then begin // prevent LCode to be added to FJavaScript more than once?
FJavaScript := FJavaScript + LCode;
end;And inside procedure TIWPageContext40.FinalizeContext; is a last line as follows:
Code:
AddToJavaScriptOnce(' return true;' + EOL + '}' + EOL);
end;which means that I must now ensure that there is no snippet of JavaScript equal to
Code:
' return true;' + EOL + '}' + EOLWhich means that for example
Code:
if (event.keyCode != 13) {
return true;
}
else
{
IWBUTTON_BUSCAIWCL.click();
return false;
};I'm sorry, but I do not believe it's feasible to ask IntraWeb developers to never add the snippet containing " return true;EOL}EOL" using AddToJavaScriptOnce to prevent procedure TIWPageContext40.FinalizeContext from breaking.
Groetjes, Bob Swart

