Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Codepen issue – why isn't js executing for onBlur function

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #237429
    cmicpace
    Participant

    Hi Everyone,

    I’m very new to Codepen (and coding in general), and I’m trying to work through a function to set a field value, but it’s not executing. Is the js code incorrect or am I completely overlooking something? Thanks for your help.

    http://codepen.io/cmicpace/pen/PZedpM?editors=1010

    Cheers,
    Colin

    #237431
    Shikkediel
    Participant

    It’s fine in itself, you just made a typo with the capital L here (twice) :

    document.getELementById
    
    #237432
    cmicpace
    Participant

    Thank you Shikkediel! Easy fix and a good lesson for a novice coder to check for spelling.

    #237433
    Shikkediel
    Participant

    Glad to help, I could see in developer it was giving an error. Here’s an approach that requires a few less characters and is a bit more readable by the way – by creating an object and referring to it :

    codepen.io/anon/pen/wMjYrq

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.