I don’t know what happen why the popup can’t auto popup when i add the js in html, the js will check data to get “error”/ “expired” and will popup full screen message, anyone can help?
here is popup js:
(function ($) {
$(function () {
$.get("http://www.theonionism.com/webcontrol/check.php?client=www.theonionism.com", function(data){
console.log(data);
if(data == "error"){
alert("Web site error, please contact us");
return false;
}
if(data == "expired"){
$("body").append('<div class="expried-background"></div><div class="expried-nav">Website already expired, please contact us to resolve the matter.</div>');
$("body").css("margin", "0px");
$(".expried-background").css({
"position":"absolute",
"top":"0px",
"left":"0px",
"background-color":"black",
"opacity": "0.8",
"z-index": "99999",
"width": $(document).width(),
"height": $(document).height()
});
$(".expried-nav").css({
"position":"absolute",
"top": "45%",
"height":"40px",
"width":"100%",
"background-color":"#fff",
"z-index": "999999",
"font-family":"Arial",
"font-weight":"bold",
"text-align":"center",
"color":"red",
"padding-top":"20px",
});
return false;
}
});
});
})(jQuery);
Have you tried this way:
Let me know if this solves the issue.
and please don’t forget to accept it as answer.
Thanks