error popup working, need to finish javascript to pull key