I'm trying to include an onclick javascript inside php but I can't get it to work properly. The link will open in a new tab on the browser but not in a new window which is what the Javascript does.
I believe I have escaped the single quotes correctly which is what I thought the problem might be.
See the php code below.
$image = sprintf( '<div class="wpcp-slide-image"><a onclick="window.open(this.href, \'left=20,top=20,resizable=0\'); return false;" href="'.$custom_notification_data.'">%1$s</a></div>', $post_thumb, get_the_permalink() );