Based on message of javascript