• Hello all,

    I’m trying to put a piece of Javascript within a php echo do_shortcode and when I do the page become blank after I refresh. I’m still learning PHP and would like to know if this is possible and how to get it working. Here is my code:

    <?php echo do_shortcode(‘[showto browser=”tablet”]<script language=”javascript”>
    document.write(‘<scr’+’ipt async language=”javascript” src=”http://udmserve.net/udm/img.fetch?sid=7789;tid=1;ev=1;dt=6;cb=’+Math.random()+&#8217;;”></scr’+’ipt>’);
    </script>[/showto]’); ?>

    Thanks!

The topic ‘Javascript within php echo do_shortcode’ is closed to new replies.