adding js text sending method