0

i try to work with jquery to make popup

but my problem it's bloked from google

my code

<script type="text/javascript">   
$(document).ready(function () {
    var flag = true;
    if (event.target == this & flag) {
        window.open('<? echo $lllllink ; ?>');
        flag = false;
    }
});
</script>

i think do it with any open to do mouse left click automatic but it's not work too any one can help ?

Tushar Gupta - curioustushar
  • 58,085
  • 24
  • 103
  • 107
  • 1
    Browsers routinely block pop-ups unless they're tied to a user event like a mouse-click. Unless the user consciously allows pop-ups this won't work. It won't work if you try to simulate a mouse-click either. –  Sep 22 '13 at 04:11
  • Possible duplicate: http://stackoverflow.com/questions/6192889/legally-avoiding-popup-blocking – Flight Odyssey Sep 22 '13 at 04:16

1 Answers1

3

Most modern browsers block pop-ups by default.

However, if you are using jQuery. I recommend looking at the jQuery UI Dialog. This is part of the HTML page and does not get blocked by the browser. This is in general the more elegant and preferred way of doing pop-ups these days.

ced-b
  • 3,957
  • 1
  • 27
  • 39