updated to display in console as well

Updated the script to display both as an alert response and a log on
the console.