Forum Moderators: open
function sondage(){
var nbFoisNum = 1;
var surNum = 3;
var rndNum;
rndNum = Math.floor(Math.random()*surNum);
if ( rndNum <= nbFoisNum ){
//Local Variable Decleration
OpenPopup();
}
}
function OpenPopup() {
openpopup = window.open("https://ipsvr03.iperceptions.com/popup/webpopupC52F.asp","popupwin","width=400,height=435,left=0,top=10,resizable=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes");
}
thank you very much
If you want to work on a probability basis (on average one out of two times the popup window will fire), then you can use code like this:
function myRandom(){
var seed=10
output=Math.floor(Math.random()*seed)
if(output<=4){
OpenPopup();
}
}
If, on the other hand, you want it to pop up exactly, setting and retrieving a cookie might be a better way.
Hope this helps,
ajkimoto