fixing js error and adding post submit messages in advanced settings page