Click here to Skip to main content
15,900,110 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Explaining JavaScript and this to people. Pin
the goat in your machine3-Dec-17 15:34
the goat in your machine3-Dec-17 15:34 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon3-Dec-17 15:35
professionalJeremy Falcon3-Dec-17 15:35 
GeneralRe: Explaining JavaScript and this to people. Pin
Marc Clifton4-Dec-17 5:11
mvaMarc Clifton4-Dec-17 5:11 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon4-Dec-17 5:54
professionalJeremy Falcon4-Dec-17 5:54 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon3-Dec-17 15:02
professionalJeremy Falcon3-Dec-17 15:02 
GeneralRe: Explaining JavaScript and this to people. Pin
Rob Grainger4-Dec-17 1:38
Rob Grainger4-Dec-17 1:38 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon4-Dec-17 4:26
professionalJeremy Falcon4-Dec-17 4:26 
GeneralRe: Explaining JavaScript and this to people. Pin
Marc Clifton4-Dec-17 5:19
mvaMarc Clifton4-Dec-17 5:19 
Jeremy Falcon wrote:
Clearly, you're looking at code written by a 5 year old that doesn't know anything about CSS selectors or jQuery.


You're off by 50 years. Smile | :) And this is exactly why Javascript is so hard to learn. There are no (and no good) resources for how to do things other than SO, CP, and dubious forums by 3rd party vendors. Why? Because who the heck is going to write a book on how to do X when, given the multi-dimensional landscape of web development, describing where X is in this trans-dimensional space is pretty much impossible.

Granted, all my examples are related to using jQuery and 3rd party frameworks, but it's impossible to disentangle Javascript from those things when doing web development.

Jeremy Falcon wrote:
but the whole $($($($($('#omg'))))) thing can be avoided.


Beats me how to do it. The content of the tree (a jqxwidget) is programatically generated and I haven't figured out a simpler way of getting the text (not to mention the freaking ID) of the parent for a selected node. One option is to represent the tree as a Javascript structure, this would be simple enough to map ID's in the structure to the DOM that jqwidgets creates. And heaven help me if I have to learn one of the Angular/React/etc/ frameworks that jqwidgets claims to support. More obfuscation on top of nebulous indirection.

Yup -- I'm an old fart. Wink | ;)
Latest Article - Class-less Coding - Minimalist C# and Why F# and Function Programming Has Some Advantages

Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

Artificial intelligence is the only remedy for natural stupidity. - CDP1802

GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon4-Dec-17 6:05
professionalJeremy Falcon4-Dec-17 6:05 
GeneralRe: Explaining JavaScript and this to people. Pin
Marc Clifton4-Dec-17 11:08
mvaMarc Clifton4-Dec-17 11:08 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon4-Dec-17 12:11
professionalJeremy Falcon4-Dec-17 12:11 
GeneralRe: Hey check this out... Pin
Jeremy Falcon3-Dec-17 15:27
professionalJeremy Falcon3-Dec-17 15:27 
GeneralRe: Hey check this out... Pin
Chris Maunder3-Dec-17 15:43
cofounderChris Maunder3-Dec-17 15:43 
GeneralRe: Hey check this out... Pin
Jeremy Falcon3-Dec-17 16:02
professionalJeremy Falcon3-Dec-17 16:02 
GeneralRe: Hey check this out... Pin
Marc Clifton4-Dec-17 5:22
mvaMarc Clifton4-Dec-17 5:22 
GeneralRe: Hey check this out... Pin
Jeremy Falcon4-Dec-17 5:53
professionalJeremy Falcon4-Dec-17 5:53 
GeneralRe: Explaining JavaScript and this to people. Pin
jsc423-Dec-17 21:29
professionaljsc423-Dec-17 21:29 
GeneralRe: Explaining JavaScript and this to people. Pin
Nathan Minier4-Dec-17 1:32
professionalNathan Minier4-Dec-17 1:32 
GeneralRe: Explaining JavaScript and this to people. Pin
grolarbear4-Dec-17 2:11
grolarbear4-Dec-17 2:11 
GeneralRe: Explaining JavaScript and this to people. Pin
Marc Clifton4-Dec-17 5:26
mvaMarc Clifton4-Dec-17 5:26 
GeneralRe: Explaining JavaScript and this to people. Pin
PIEBALDconsult3-Dec-17 14:17
mvePIEBALDconsult3-Dec-17 14:17 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon3-Dec-17 14:30
professionalJeremy Falcon3-Dec-17 14:30 
GeneralRe: Explaining JavaScript and this to people. Pin
Chris Maunder3-Dec-17 15:41
cofounderChris Maunder3-Dec-17 15:41 
GeneralRe: Explaining JavaScript and this to people. Pin
Jeremy Falcon3-Dec-17 16:00
professionalJeremy Falcon3-Dec-17 16:00 
GeneralRe: Explaining JavaScript and this to people. Pin
Jörgen Andersson3-Dec-17 19:39
professionalJörgen Andersson3-Dec-17 19:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   482 votes