The alert is not popping up on the code below, but it works when it is not inside of the if statement. Any help is appreciated.
`function publish() { var na