What's new
  • Welcome to PHCorner forums. Take a moment to sign up and gain unlimited access and extra privileges that guests are not entitled to, such as: All that and more! Registration is quick, simple and absolutely free. Join our community today!

PATULONG PO

dallars

Leecher
Joined
May 20, 2016
Messages
4
Reaction
4
<div class="afs_ads">&nbsp;</div>
<script>
(function() {
var message = "We've detected that you have an ad blocker enabled! Please unable it and help support our work!";

// Define a function for showing the message.
// Set a timeout of 2 seconds to give adblocker
// a chance to do its thing
var tryMessage = function() {
setTimeout(function() {
if(!document.getElementsByClassName) return;
var ads = document.getElementsByClassName('afs_ads'),
ad = ads[ads.length - 1];

if(!ad
|| ad.innerHTML.length == 0
|| ad.clientHeight === 0) {
alert(message);
//window.location.href = '[URL of the donate page. Remove the two slashes at the start of thsi line to enable.]';
} else {
ad.style.display = 'none';
}

}, 2000);
}

/* Attach a listener for page load ... then show the message */
if(window.addEventListener) {
window.addEventListener('load', tryMessage, false);
} else {
window.attachEvent('onload', tryMessage); //IE
}
})();
</script>

pa help nga po.. mapaganda to... ang gusto ko po kasi mangyari eh imbis na windows alert ang lumabasw mas maganda siguro kung modal(bootstrap).. 1st year lang po ako pahelp naman po.. salamat.
 

wachichaw

Leecher
mas madali if gamit ka nang jquery library tol at bootstrap pacakge nan dun kc yung bootstrap.min.js

tapos tawagin mo nalang yung modal pero set mo yung pop up nalang modal
with windows is loaded jquery kc gamit ko for these kaya ito yung sample $(#modal_id).modal('show');
but before that never forget to import jquery lib and bootstrap din basic modal coding
div div div lang mostly tapos classing sa bootstrap like modal fade, modal dialog, modao content and etc.
goodluck
 
Comment

YokaiDesuDesu

Enthusiast
Create a <div> set mo yung style sa CSS (of course) .. use, Absolute sa Position, z-index para din may magawa kang Black BG :) .. ganun lang kadali .. tapos kapag tatawagin mo na .. Gamitin mo yung Ginawa mong JS Code
 
Comment

Online statistics

Members online
1,050
Guests online
1,181
Total visitors
2,231

Forum statistics

Threads
1,091,796
Messages
18,323,810
Members
1,525,722
Comments
1,197,841
Attachments
1,426,906
Profile posts
97,969
Top