Implemented onselect event for table name