Thursday, 10 January 2019

JS on change if checkbox is checked do function with php

JS on change if checkbox is checked do this function with php, how I can do this, is this possible or no?

 $('.avflipswitch').on("change", function (e){ 
        if(this.checked){
         functionOne(<?php $LinkOpen = '_blank';?>);
        }
        else{
         functionTwo(<?php $LinkOpen = '_self';?>);
        }
    });

cse

<gcse:searchresults-only linktarget="<?php echo $LinkOpen;?>"></gcse:searchresults-only>



from JS on change if checkbox is checked do function with php

No comments:

Post a Comment