Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
Doseg varijablama

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
Filip



Joined: 12 Jan 2008
Posts: 19

PostPosted: 24.02.2012 18:51    Post subject: Doseg varijablama Add user to your forum ignore list Reply with quote

Poceo sam raditi u nekom js framework-u i do sad nisam nikad ulazio u dubinu js, koristio sam ju uvijek samo za validaciju i ajax pozive, nebitno pitanje je iz jedne funkcije predati vrijednost drugoj, trebalo bi preko this ali ne radi.


Code:

Tine.App.Config.SystemSettings = function () {
   var self = this;
   var settings';
   
   ...
   
   // load settings
    loadData = function () {
           
      settingsProxy.loadRecord(configRec, {
         scope: this,
         success: function (record,) {
            var settings = record.get('settings');   
            // tu imam settings kako ga dati onom gore s this.settings ne ide
                                // da mogu pristupisi u funckiji saveData
            ....
         }
      })
   },
   
   saveData = function () {
      console.log(this.settings);
   }
}
Back to top
View user's profile Send private message
Limeni



Joined: 13 Nov 2007
Posts: 109

PostPosted: 24.02.2012 23:57    Post subject: Add user to your forum ignore list Reply with quote

U JavaScriptu varijable mozes definirati ovako:
var nesto = "nesto";
nesto = "nesto";

Prva ima lokalni, druga globalni scope. Wink
Back to top
View user's profile Send private message
Filip



Joined: 12 Jan 2008
Posts: 19

PostPosted: 28.02.2012 12:37    Post subject: Add user to your forum ignore list Reply with quote

hvala limeni

to sam zeznuo, sad radi Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group