Go4Expert

Go4Expert (http://www.go4expert.com/)
-   JavaScript and AJAX (http://www.go4expert.com/forums/javascript/)
-   -   T35 Ad deletion (http://www.go4expert.com/forums/t35-ad-deletion-t17404/)

thedavinci 8May2009 03:32

T35 Ad deletion
 
I have a website hosted by T35 and its the free version. I was kind of frustrated with the ads that T35 puts on my website, so I thought up a way to get rid of these ads...Just use Javascript. Place this code below into the head of the document, and add a link to call the document. Look below,
Code:

<html>
<head>
<script type='text/javascript'>
function hideAds(){
 var table=(document.getElementsByTagName("table").length)-1;
 void(document.getElementsByTagName("table")[table].innerHTML="");
}
</he...

And in the document somewhere, put a link/call to the function...

Code:

<a href='javascript:hideAds();'>Hide these ads</a>
And that's all!! This should make the last table element on your web page (which is where T35 places its ads) have no contents, getting rid of those nasty ads...
Enjoy!

thedavinci 8May2009 03:34

Re: T35 Ad deletion
 
Hey, sorry but I do not yet have the permission to edit my posts, I forgot to finish the script tag with a
Code:

</script>
. Sorry!

akshits 11May2009 10:45

Re: T35 Ad deletion
 
Hello,

I don't understand what does you code do and I've specially join T35 to help you out. Your website tries to remove ads from the page, if I'm not mistaken. As per what I know by registering into the new T35 account, the T35 website makes a div named "t35ad". Below is a code which may help you.

Code:


<script>

function $(id) { return document.getElementById(id); }
window.onLoad = function() { $("t35ad").style.display="none"; }
document.onLoad = function() { $("t35ad").style.display="none"; }

</script>

Thus I assure you 99.9% sure that the code shall work !!

Regards

Handers 11Jun2009 19:52

Re: T35 Ad deletion
 
I found this website with google but those solutions are not 100% perfect, not in all browsers at least :)

I dont know how to use akshits code but it's not really working for me....

thedavinci's code (lol sounds funny :P) works but only in firefox.

I have come up with another solution which does not delete the code but makes it invisible. It does that by putting it into a 0px by 0px div and throw it into a corner behind your website. Here's the code:

Code:

<div style="font-size:0px; position:absolute; width:0px; height:0px; color:#000000; z-index:-1; overflow:hidden;"><xmp></body></xmp></div>
<script type='text/javascript'>
document.write('</bo');
document.write('dy>');
</script>
</html>


Handers 12Jun2009 20:24

Re: T35 Ad deletion
 
I see I forgot to metion how to use this code....

You replace your end body tag:

Code:

</body>
with

Code:

<div style="font-size:0px; position:absolute; width:0px; height:0px; color:#000000; z-index:-1; overflow:hidden;"><xmp></body></xmp></div>
<script type='text/javascript'>
document.write('</bo');
document.write('dy>');
</script>



All times are GMT +5.5. The time now is 04:54.