www.webdeveloper.com
Results 1 to 5 of 5

Thread: function() unload?

  1. #1
    Join Date
    Mar 2010
    Posts
    29

    Post function() unload?

    Hi out there,

    is there a possibility to unload a function()?

    I'm using excluded javascript files and just load them into my app, if needed. But if not needed anymore (e. g. content change), I'd like to "unload" them ...

    Tried "Google & friends", but the results send me here ...

    Any ideas? Thank you very much ...

    Best regards
    Steel

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by SteelWheel View Post
    Hi out there,

    is there a possibility to unload a function()?

    I'm using excluded javascript files and just load them into my app, if needed. But if not needed anymore (e. g. content change), I'd like to "unload" them ...

    Tried "Google & friends", but the results send me here ...

    Any ideas? Thank you very much ...

    Best regards
    Steel
    This is the main disadvantage of using libraries. Willing or not, you must use that whole 2 tones press machine even if you want to crack just a single nut. You are not obliged to use libraries for every simple task. Have you tried learning and coding in plain native javascript?
    Last edited by Kor; 03-25-2010 at 10:38 AM.

  3. #3
    Join Date
    Mar 2010
    Posts
    29
    Hi Kor,

    maybe a small example:

    The page started, content is shown to visitor and the site has a function() named "startUp()" directly included - not external, hard-coded inside. ^^ Changing content by AJAX requires "startUp()" not longer - is there a way to "remove" this function, because all following content doesn't require "startUp()"?

    The answer can't be "this is the main disadvantage of using libs".

  4. #4
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    You may "nullify" the function inserting, when you end need it, something like:
    Code:
    window['startUp']=function(){null};
    If I well understood your aim
    Last edited by Kor; 03-25-2010 at 10:55 AM.

  5. #5
    Join Date
    Mar 2010
    Posts
    29
    Ah ... interesting idea ... I'll try it shortly ...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles