the onlcick function is not working in the below case it always i have checked in ie8, and in some computer firefox and chrome also not working.
$ad_div1='<div onclick="window.location=\''.$url.'\'">
<a target="_blank" href="http://yahoo.com"> <img src="http://rose.com/abc.jpg"/></a>
</div>';
but when i give an alert
before window.location
its working ie,
$ad_div1='<div onclick="alert(1);window.location=\''.$url.'\'">
<a target="_blank" href="http://yahoo.com"> <img src="http://rose.com/abc.jpg"/></a>
</div>';
How to slove this problem?