Is there a way to run a function after another functions completes? For example:
doSomething(); doSomethingElse();
i only want doSomethingE
The question is a bit vague.
If your functions have asynchronous bits to them, then use callbacks. That's what they are for.
If, however, you want to do aspect-oriented programming in JavaScript, take a look at jQuery-aop.