Created JS function to reload pages on confirmation windows