Javascript: window.open popup on every clicks -
i using below script popup url when clicks blog page.
<script type="text/javascript"> document.body.onclick= function(){ window.open('https://mywebpage.com', 'poppage', 'toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=1, width=950, height=650, left = 300, top = 50'); }</script>
the issue , if u user clicks anywere in blog mywebpage url pops up, many times clicks keep on pops up, need 1 time should popup webpage until session ends browser
one method have onclick switch boolean's value in 1 direction only, , have window open when boolean switched. onclick activates every click: http://www.w3schools.com/jsref/event_onclick.asp
also, should tagged javascript, not java.
Comments
Post a Comment