This simply means that the script has come to a point during execution where the variable afterSave is referenced but the variable has not been defined somewhere in the script. The script could also be looking for a function named afterSave and it can't be found.
Open the script in Dreamweaver or a text editor and do a search for the word afterSave. If it's a variable that's used in only one function, initialize it as a local variable within that function with the line "var afterSave". If it's a value that's used in several functions, initialize it as a global variable with the same line placed above the first function in the script. If it's a missing function, you have problems.
Where do I find script in dreamweaver?
That's a good question.
The script could be on-page - look at the page in source code view and see if it's there.