Popup not working?

Can anyone tell me why a popup triggered by a button works when previewed (Safari/ Chrome/Firefox) but NOT after the same site has been published to a folder on a local drive?

I have cleared the caches…

@Andrewg, This has been covered several times in the forum.
Viewing the website from Finder in a browsers prevents certain functions and events from working. Publishing the site to a host will resolve the issue.