Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete a Function...?

Status
Not open for further replies.
Dec 24, 2001
857
GB
Is there any way to delete a function or tell it to stop running after its been called?

I have one which handles a number of RollOver events for a help function but I want it to stop running when they turn help off. At the moment, once help is on it stays on!

Of course, I could go through and write code to turn off EVERY RollOver event, but then that wouldnt be very efficient would it!

thanks
 
Set a global boolean value (ex: _global.blnHelpEnabled) for whether or not help is enabled and check it in your event function. Something like:

Code:
function evtFunction(){
if(blnHelpEnabled != true){
    //do stuff
}

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top