The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi,
I have a script from an advertiser that produces a geo-targetted text link. The problem is the script is slow to load which delays loading the rest of my site, as this code is placed in the header. Is there some way I can have the script load last, but still have it show in the header? Here is the relevant code from the advertiser. Code:
<script src="http://banners.adultfriendfinder.com/piclist?message=5&p=text_links&pid=p174798&rand=4&target=_blank&site=ffadult&this_page=banners_text_links"></script> Ian |
#2
|
||||
|
||||
![]()
Try:
Code:
<script src="http://banners.adultfriendfinder.com/piclist?message=5&p=text_links&pid=p174798&rand=4&target=_blank&site=ffadult&this_page=banners_text_links" defer></script> |
#3
|
|||
|
|||
![]()
Hi,
Apparently the defer attribute does not work in firefox. I am hoping to find a solution using css position maybe? or javascript even? Cheers |
#4
|
||||
|
||||
![]()
Put this where you want the ads:
HTML Code:
<div id="adsplaceholder"> </div> HTML Code:
<div id="myads"><script src="http://banners.adultfriendfinder.com/piclist?message=5&p=text_links&pid=p174798&rand=4&target=_blank&site=ffadult&this_page=banners_text_links"></script></div> <script type="text/javascript"> var adtarget = document.getElementById('adsplaceholder'); var ads = document.getElementById('myads'); adtarget.appendChild(myads); </script> |
#5
|
|||
|
|||
![]()
Hi,
After making those edits, nothing shows up where the adsplaceholder div is, and the myads div shows at the very bottom of the footer... |
#6
|
||||
|
||||
![]()
Hmmm, I just did a test and it worked for me.
|
#7
|
|||
|
|||
![]()
Any ideas what I could be doing wrong? These edits seem pretty simple...
So just to be clear I added the adsplaceholder div in my header, with nothing between the div tags. And added the myads div + the javascript in my footer. The ad shows where the myads div is placed, and nothing shows up where the adsplaceholder div is... |
#8
|
||||
|
||||
![]()
Ok, I just tested it again.
I added this to the very bottom of the navbar template Code:
<div id="adsplaceholder"></div> Code:
<div id="myads"><script src="http://banners.adultfriendfinder.com/piclist?message=5&p=text_links&pid=p174798&rand=4&target=_blank&site=ffadult&this_page=banners_text_links"></script></div> <script type="text/javascript"> var my_ads = document.getElementById('myads'); document.getElementById('adsplaceholder').appendChild(my_ads); </script> |
#9
|
|||
|
|||
![]()
Yup that worked! Sure beats using a ghetto transparent iframe.!
Thanks alot! |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|