Click here to Skip to main content
15,899,825 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: Unobtrusive Javascript is bad Pin
Michael Breeden4-Feb-14 3:17
Michael Breeden4-Feb-14 3:17 
GeneralRe: Unobtrusive Javascript is bad Pin
W Balboos, GHB3-Feb-14 3:18
W Balboos, GHB3-Feb-14 3:18 
GeneralRe: Unobtrusive Javascript is bad Pin
User 48350473-Feb-14 3:46
User 48350473-Feb-14 3:46 
GeneralRe: Unobtrusive Javascript is bad Pin
Michael Breeden3-Feb-14 3:59
Michael Breeden3-Feb-14 3:59 
GeneralRe: Unobtrusive Javascript is bad Pin
User 48350473-Feb-14 4:49
User 48350473-Feb-14 4:49 
GeneralRe: Unobtrusive Javascript is bad Pin
Michael Breeden3-Feb-14 5:15
Michael Breeden3-Feb-14 5:15 
GeneralRe: Unobtrusive Javascript is bad Pin
User 48350473-Feb-14 5:32
User 48350473-Feb-14 5:32 
GeneralRe: Unobtrusive Javascript is bad Pin
Michael Breeden3-Feb-14 5:50
Michael Breeden3-Feb-14 5:50 
Validation is something that should be generalized and probably from a library. Both should be in an external file, the attachment though should be at the element that is to be validated (IMO).

If you are sending JSON for configuration or data, then it is javascript that is doing the responding. The element might request the information, but the element cannot (normally) read JSON. The JSON may setup the event, but by then you had better be keeping track of what you are doing. Really, you point to the larger sphere of this issue. When you attach an event at an element, you are actually placing meta data - "when this type event happens, do this". So instead of specifically saying that "a javascript event should be attached where the element is declared", it should be "there should be meta data at the element describing that an event of such type is attached here and will so something like this". It is also known as documentation or self-documentation, the mark of a professional programmer.

Once you are doing configuration with JSON it is your responsibility to let the maintenance developer know what you had in mind... and something about what is expected from the server... another goto blind situation.
GeneralRe: Unobtrusive Javascript is bad Pin
User 48350473-Feb-14 6:10
User 48350473-Feb-14 6:10 
GeneralRe: Unobtrusive Javascript is bad Pin
Dennis E White3-Feb-14 9:11
professionalDennis E White3-Feb-14 9:11 
GeneralRe: Unobtrusive Javascript is bad Pin
Michael Breeden3-Feb-14 9:36
Michael Breeden3-Feb-14 9:36 
GeneralRe: Unobtrusive Javascript is bad Pin
Dennis E White3-Feb-14 10:24
professionalDennis E White3-Feb-14 10:24 
GeneralRe: Unobtrusive Javascript is bad Pin
Michael Breeden3-Feb-14 10:55
Michael Breeden3-Feb-14 10:55 
GeneralRe: Unobtrusive Javascript is bad Pin
Dennis E White3-Feb-14 13:12
professionalDennis E White3-Feb-14 13:12 
GeneralRe: Unobtrusive Javascript is bad Pin
Michael Breeden3-Feb-14 23:49
Michael Breeden3-Feb-14 23:49 
GeneralRe: Unobtrusive Javascript is bad Pin
Dennis E White4-Feb-14 10:25
professionalDennis E White4-Feb-14 10:25 
GeneralRe: Unobtrusive Javascript is bad Pin
Andy Brummer3-Feb-14 9:44
sitebuilderAndy Brummer3-Feb-14 9:44 
GeneralNew Plan For Groundhog Day, or Conversation With My Wife Pin
Tim Carmichael3-Feb-14 1:44
Tim Carmichael3-Feb-14 1:44 
GeneralRe: New Plan For Groundhog Day, or Conversation With My Wife Pin
OriginalGriff3-Feb-14 1:50
mveOriginalGriff3-Feb-14 1:50 
GeneralRe: New Plan For Groundhog Day, or Conversation With My Wife Pin
HobbyProggy3-Feb-14 2:18
professionalHobbyProggy3-Feb-14 2:18 
GeneralRe: New Plan For Groundhog Day, or Conversation With My Wife Pin
W Balboos, GHB3-Feb-14 3:22
W Balboos, GHB3-Feb-14 3:22 
GeneralRe: New Plan For Groundhog Day, or Conversation With My Wife Pin
Ravi Bhavnani3-Feb-14 5:29
professionalRavi Bhavnani3-Feb-14 5:29 
GeneralNo CCC today ? Pin
pkfox3-Feb-14 1:29
professionalpkfox3-Feb-14 1:29 
GeneralRe: No CCC today ? Pin
HobbyProggy3-Feb-14 1:31
professionalHobbyProggy3-Feb-14 1:31 
GeneralRe: No CCC today ? Pin
Keith Barrow3-Feb-14 1:51
professionalKeith Barrow3-Feb-14 1:51 

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   476 votes