trying to get the showalert to be set on a timeout

looked up some crazy code hopefully it works