Click here to Skip to main content
15,892,161 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionJson Restriction while posting large data through ajax Pin
Member 116922503-Aug-15 0:24
Member 116922503-Aug-15 0:24 
AnswerRe: Json Restriction while posting large data through ajax Pin
Kornfeld Eliyahu Peter4-Aug-15 20:52
professionalKornfeld Eliyahu Peter4-Aug-15 20:52 
GeneralRe: Json Restriction while posting large data through ajax Pin
Member 116922504-Aug-15 21:11
Member 116922504-Aug-15 21:11 
AnswerRe: Json Restriction while posting large data through ajax Pin
Kornfeld Eliyahu Peter4-Aug-15 21:14
professionalKornfeld Eliyahu Peter4-Aug-15 21:14 
General'undefined' is a flaw in JavaScript Pin
le_top1-Aug-15 0:17
le_top1-Aug-15 0:17 
GeneralRe: 'undefined' is a flaw in JavaScript Pin
Kornfeld Eliyahu Peter3-Aug-15 3:58
professionalKornfeld Eliyahu Peter3-Aug-15 3:58 
GeneralRe: 'undefined' is a flaw in JavaScript Pin
le_top3-Aug-15 4:54
le_top3-Aug-15 4:54 
AnswerRe: 'undefined' is a flaw in JavaScript Pin
Kornfeld Eliyahu Peter3-Aug-15 7:37
professionalKornfeld Eliyahu Peter3-Aug-15 7:37 
Think about how JavaScript enclosed inside DOM...
When you write var n = new Number();, Number is a shortcut for window.Number. Same goes for undefined (it is a property of the window object, but not number or string)...The problem is that since ECMA 5 it is read-only and for that can not be overridden...
So there is no way to 'fake' and automatic boxing of undefined in the context of window, but you can create an object that does it and create your own closure (scope) that will define undefined as that object...
If you ever saw an opening line like this...
JavaScript
(function (window, document) {
  // we refer to window and document normally
})(window, document);

Didn't you asked yourself why those parameters, especially undefined? So it is because before ECMA 5 undefined was mutable...
Now if you do not bring undefined in (to protect yourself) into your closure, you can define an the name 'undefined' with other value and start using it inside your closure...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.

GeneralRe: 'undefined' is a flaw in JavaScript Pin
le_top3-Aug-15 8:09
le_top3-Aug-15 8:09 
AnswerRe: 'undefined' is a flaw in JavaScript Pin
Kornfeld Eliyahu Peter4-Aug-15 21:16
professionalKornfeld Eliyahu Peter4-Aug-15 21:16 
SuggestionRe: 'undefined' is a flaw in JavaScript Pin
camycentsolutions5-Aug-15 23:40
camycentsolutions5-Aug-15 23:40 
QuestionSimple Slideshow Pin
Alex Mander30-Jul-15 6:20
Alex Mander30-Jul-15 6:20 
QuestionJava Script Pin
jubayer30-Jul-15 3:15
jubayer30-Jul-15 3:15 
AnswerRe: Java Script Pin
Afzaal Ahmad Zeeshan30-Jul-15 4:07
professionalAfzaal Ahmad Zeeshan30-Jul-15 4:07 
QuestionIncrementing/Decrementing not by 1 Pin
Member 1184785029-Jul-15 19:14
Member 1184785029-Jul-15 19:14 
AnswerRe: Incrementing/Decrementing not by 1 Pin
Peter_in_278029-Jul-15 20:27
professionalPeter_in_278029-Jul-15 20:27 
QuestionOK, Javascript gurus, why is "if" not evaluating as true or false ? Pin
Marc Clifton28-Jul-15 15:19
mvaMarc Clifton28-Jul-15 15:19 
QuestionRe: OK, Javascript gurus, why is "if" not evaluating as true or false ? Pin
Richard Deeming29-Jul-15 1:50
mveRichard Deeming29-Jul-15 1:50 
AnswerRe: OK, Javascript gurus, why is "if" not evaluating as true or false ? Pin
Marc Clifton29-Jul-15 4:39
mvaMarc Clifton29-Jul-15 4:39 
GeneralRe: OK, Javascript gurus, why is "if" not evaluating as true or false ? Pin
Richard Deeming29-Jul-15 4:47
mveRichard Deeming29-Jul-15 4:47 
GeneralRe: OK, Javascript gurus, why is "if" not evaluating as true or false ? Pin
Marc Clifton29-Jul-15 5:09
mvaMarc Clifton29-Jul-15 5:09 
AnswerRe: OK, Javascript gurus, why is "if" not evaluating as true or false ? Pin
Afzaal Ahmad Zeeshan29-Jul-15 5:20
professionalAfzaal Ahmad Zeeshan29-Jul-15 5:20 
AnswerRe: OK, Javascript gurus, why is "if" not evaluating as true or false ? Pin
F-ES Sitecore30-Jul-15 22:22
professionalF-ES Sitecore30-Jul-15 22:22 
GeneralRe: OK, Javascript gurus, why is "if" not evaluating as true or false ? Pin
Richard Deeming31-Jul-15 0:40
mveRichard Deeming31-Jul-15 0:40 
GeneralRe: OK, Javascript gurus, why is "if" not evaluating as true or false ? Pin
F-ES Sitecore31-Jul-15 1:03
professionalF-ES Sitecore31-Jul-15 1:03 

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.