Auto click script

total.load

Newbie
Joined
Jan 24, 2012
Messages
22
Reaction score
2
I've found this script:
PHP:
<a id="abanner"><img src="#" id="ibanner" alt="" /></a>

<script type="text/javascript">
//fill in the information here:
bannerCreate("yourimage","yourlink");

function openWindow(linkLocation)
{
    window.open(linkLocation,"");
    
}

function bannerCreate(imageSrc,linkLocation)
{
    var a=document.getElementById("abanner");
    var i=document.getElementById("ibanner");
    a.href="javascript: openWindow('"+linkLocation+"')";
    i.src=imageSrc;
}

</script>
And it says that will auto click (and open in new window).
I don't know much about javascript.What I have to add so it 'll become functional with my site,and where I have to upload it(i have an wordpress site)?
 
This script don't auto clicks, it creates banner with image "yourimage" and opens new window with "yourlink" when you click the link. You can add <script>...</script> to header.php file of your wordpress theme. and <a>...</a> in place where you want to insert banner.
 
Back
Top