A new fluorescent chemosensor based on the calix[4]arene of partial cone conformation possessing a dansyl moiety has been synthesized. The chemosensor demonstrates selective optical recognition of Hg(2+) and Cu(2+) in two contrasting modes. The receptor exhibited ratiometric sensing of Hg(2+) and "ON-OFF" type of fluorescence behavior in the presence of Cu(2+). The compound behaves as a fluorescent molecular switch upon chemical inputs of Hg(2+) and Cu(2+) ions.