alert working for tiesand scores not being saved, but page returns 'undefined' instead of TBA or numbers when refreshed.