Changed js script before query