Call Javascript Function From Php And Condition In R