Hello.
I have javvascript code on my site
[CODE]if (result[0] == “doCheckEmailAccountSettings”) {
emailAccoutSettingChecked(result);
return;
}
if (result[0] == “doEditEmailAccount”) {
showEditEmailAccount(result);
return;
}
if (result[0] == “doDeleteEmailAccount”) {
getAllForUser();
return;
}
if (result[0] == “doBackupEmailBox”) {
showBackupAccount(result);
return;
}
if (result[0] == “getAmountOfEmails”) {
doBackupInit(result);
return;
}
This listing is very long. Near 50 such functions.
Is it possible to optimise this code?
I can rename my function to make them simething like
[CODE]var functionname=’BackFunc_’+result[0];
How then i can call function and how ot check if function exists?
Thanks.