# Preventing Funtions to EXECUTE

**URL:** <https://forum.kirupa.com/t/preventing-funtions-to-execute/158764>\
**Category:** web dev\
**Created:** [August 11, 2005, 5:41pm UTC](https://forum.kirupa.com/t/preventing-funtions-to-execute/158764 "2005-08-11T17:41:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bandinopla](https://avatars.discourse-cdn.com/v4/letter/b/9e8a1a/32.png) [@bandinopla](https://forum.kirupa.com/u/bandinopla)\
**Post date:** [August 11, 2005, 5:41pm UTC](https://forum.kirupa.com/t/preventing-funtions-to-execute/158764/1 "2005-08-11T17:41:53Z")

</div>

How can I prevent a function, with javascript, to not execut… or making it null…

I can do this?

function hello(){ alert(“hello”); }

hello=null;

hello(); //So the alert don’t shows up

I said this bicouse… I whant to remov the adds of a freeserver where I have some files… That adds ar put in my html with a window.onLoad kind of thing… If I know the names of some of that functions… ther’s a way for nulling them?? so the add never shows up?
