I'm sure there are a lot of people out there who know more than I do, but I cannot think of as solution which doesn't use javascript.
A (php only) non-javascript solution would surely involve reloading the page.
(Have you tried using the Canadian Yellow Pages site with javascript turned off ?)