View Single Post
Old 06-27-2019, 04:51 PM  
incredibleworkethic
Confirmed User
 
incredibleworkethic's Avatar
 
Industry Role:
Join Date: Sep 2009
Posts: 2,302
Quote:
Originally Posted by Miguel T View Post
Just don't with PHP
Quicker and easier.
I modified this script (4 options, you can change to 3) and replace images with other JS

It worked!

But what is this php you speak of? :D I'm calling it in a wordpress theme. And the ads are in javascript to make the popup. Any ideas?



var picnumber = Math.floor((Math.random() * 4) + 1);

if (picnumber == 1){
img.src = '1.jpg';
} else if (picnumber == 2) {
img.src = '2.jpg';
} else if (picnumber == 3) {
img.src = '3.jpg';
} else {
img.src = '4.jpg';
}
incredibleworkethic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote