got ids of clicked image in query