Trying to connect javascript calls