User Profile

Collapse

Profile Sidebar

Collapse
Andrej Tv
Andrej Tv
Last Activity: Mar 2 '09, 02:14 PM
Joined: Mar 2 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Yes!

    Dude, that's exactly what I was looking for!
    I didn't know that a variable created inside an object in this way
    var me = this;
    would still refer to that object otside of it.
    Thanx a lot!
    See more | Go to post

    Leave a comment:


  • How to make object assign its own method to a DOM node?

    Hi.
    I'm having troubles to come up with a way to assign an object's method to a DOM-node created by the object without hardcoding object's name.
    For example:
    Code:
    function currancySwitcher(){
        this.currancy = ['euro','usd','sek']
    	
    	var a = document.createElement('a');
    	a.title = this.currancy[0]
    	a.href = '#'+this.currancy[0]
    
    	a.onclick = function(){					
    		myObject.setCurrancy(this.title);
    ...
    See more | Go to post
    Last edited by gits; Mar 2 '09, 11:19 AM. Reason: use code tags instead of format ones
No activity results to display
Show More
Working...