Forum:SH Archive/Search Bar

How do did you guys make the searchbar (on the sidebar) show a random picture everytime you click something?