Drycodez Posted July 10, 2011 Share Posted July 10, 2011 How does javascript "this" keyword works? i cant find it in w3schools.com! Link to comment Share on other sites More sharing options...
thescientist Posted July 10, 2011 Share Posted July 10, 2011 :)if you really wan't to learn, you should really learn to do some independent research. better yet, follow the threads of your fellow posters. this was the biggest thread of the week (at least in this sub-forum), and chances are if you were attentive, you wouldn't have missed it.http://w3schools.invisionzone.com/index.php?showtopic=38677 Link to comment Share on other sites More sharing options...
niche Posted July 10, 2011 Share Posted July 10, 2011 thescientist is right about following the topics [especially when time allows]. In this case, thescientist is referring to a topic that you might have missed because the title didn't really match the content. Now when you search for the keyword "keyword" it will show up in a search for people that need to know more about the this keyword.Although, I don't know why you can't search for the word "this" in just the title - probably some kind of security. Link to comment Share on other sites More sharing options...
thescientist Posted July 10, 2011 Share Posted July 10, 2011 let's not forget the ubiquitous power of Google. A simple 'this keyword javascript' search in Google would have provided loads of info. http://www.google.com/#sclient=psy&hl=...440&bih=779 Link to comment Share on other sites More sharing options...
niche Posted July 10, 2011 Share Posted July 10, 2011 Excellent point though we should cut O. Samuel some slack. Self directed learning can be hard work. Most of us come from a learning experience that makes us wait to be queued which is exactly the wrong background for this kind of learning. O. Samuel will be like almost everyone that starts to use these forums. What doesn't kill us, makes us stronger.Stick with it O. Samuel and you will be rewarded. Link to comment Share on other sites More sharing options...
brucemand Posted July 11, 2011 Share Posted July 11, 2011 Excellent point though we should cut O. Samuel some slack. Self directed learning (SDL) can be hard work. Most of us come from a learning experience that makes us wait to be queued which is exactly the wrong background for this kind of learning. O. Samuel will be like almost everyone that starts to use these forums. What doesn't kill us, makes us stronger.Stick with it O. Samuel and you will be rewarded.you're too kind, niche - "Self directed learning" is hard work if you're serious about learning, but then so is learning in a school. IMO O.Samuel is not putting enough 'hard work'.as for the "wait to be queued", i really don't think there's that much of a delay, depending on whether our teachers are actually online, the response is usually close to immediate.the beauty of this forum is that if you have teachers spread across different timezones, you will get an immediate answer every time.not to mention a group of "SDLs" in different timezones helping one another before the teachers correct us. Link to comment Share on other sites More sharing options...
niche Posted July 11, 2011 Share Posted July 11, 2011 Whether he's applying himself, or not, wasn't my point. Never attribute to laziness, that which has a better explanation.As for my comment about "waiting to be queued", I'm referring to kind of education that happens in traditional brick and mortar setting which, I think, is the antithesis of what happens here. This is way better! I certainly wasn't referring to this forum, or any other forum. I should have been more specific.EDIT: Traditional students depend of their teachers for their curriculum. There's much less of that kind of dependence here. Hence, an inherently greater challenge for all the who participate in a forum of this kind. Link to comment Share on other sites More sharing options...
brucemand Posted July 12, 2011 Share Posted July 12, 2011 Whether he's applying himself, or not, wasn't my point. Never attribute to laziness, that which has a better explanation.you are very wise ! you'd make a very good teacher !ahh, makes sense, you're your own teacher, that's why you're so wise !! As for my comment about "waiting to be queued", I'm referring to kind of education that happens in traditional brick and mortar setting which, I think, is the antithesis of what happens here. This is way better! I certainly wasn't referring to this forum, or any other forum. I should have been more specific.EDIT: Traditional students depend of their teachers for their curriculum. There's much less of that kind of dependence here. Hence, an inherently greater challenge for all the who participate in a forum of this kind.i think both methods have their advantages, sometimes a student is not yet in a position to "help themselves" so the traditional method would be preferred - once a student is ready to "fly" on their own power, they should be let loose to progress at their potential, and this is where forums like this help.you get rewarded in kind for the efforts that you put in yourself. Link to comment Share on other sites More sharing options...
Fmdpa Posted July 12, 2011 Share Posted July 12, 2011 This article might help. Much of my understanding of the meaning of the "this" keyword came from using a developer console, namely Opera Dragonfly. The latest experimental build of Opera Dragonfly has even better support for Javascript Object inspection. How to install the latest experimental build of Opera DragonflyHow to Inspect ObjectsIt is quite easy to inspect JS objects. Here's my favorite way of doing it. Open up the dragonfly console, as seen here. In your javascript code (wherever you want to find out what "this" is) type this:console.log(this) Reload your page (with the Console still open) when the console.log() function is called, you will see something show up in the console. It should have a + sign beside it that will let you expand the object and investigate what "this" contains. Link to comment Share on other sites More sharing options...
thescientist Posted July 12, 2011 Share Posted July 12, 2011 ^ that also works in Chrome and FF (IE8+?) too.... Link to comment Share on other sites More sharing options...
Fmdpa Posted July 13, 2011 Share Posted July 13, 2011 Yeah, but I'm biased towards Dragonfly Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.