Click here to Skip to main content
15,886,199 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: JavaScript : TypeScript :: Python : <what> Pin
Richard MacCutchan20-Jan-19 21:29
mveRichard MacCutchan20-Jan-19 21:29 
QuestionInjecting an external page to a div using ajax. Pin
Member 1125974616-Jan-19 23:59
Member 1125974616-Jan-19 23:59 
AnswerRe: Injecting an external page to a div using ajax. Pin
Graham Breach17-Jan-19 0:31
Graham Breach17-Jan-19 0:31 
GeneralRe: Injecting an external page to a div using ajax. Pin
Member 1125974617-Jan-19 0:36
Member 1125974617-Jan-19 0:36 
QuestionCan someone help me reverse engineer this code and get it working as jQuery? Pin
Member 1411874515-Jan-19 4:14
Member 1411874515-Jan-19 4:14 
QuestionJavaScript Pin
Bram van Kampen11-Jan-19 13:52
Bram van Kampen11-Jan-19 13:52 
AnswerRe: JavaScript Pin
Richard MacCutchan11-Jan-19 22:50
mveRichard MacCutchan11-Jan-19 22:50 
AnswerRe: JavaScript Pin
Nathan Minier14-Jan-19 1:16
professionalNathan Minier14-Jan-19 1:16 
Scope depends on what declaration you use. The old "var" declaration gives you function scope, where everything in a given function and sub function can refer to that scope (because "this" can mess that up big time, and is likely one of the hardest things to get used to in JS). ES 2016+ introduces the "let" declaration, which has proper block scope.

Global scope comes from either declaring a var outside of a function block, or the cleaner approach of attaching it to the window object:
JavaScript
var variable =  value;
window.variable = value; 

In classically-driven approaches to JS, the window object is effectively the global namespace.
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor

QuestionGet html element position on window scroll Pin
User 41802549-Jan-19 3:43
User 41802549-Jan-19 3:43 
AnswerRe: Get html element position on window scroll Pin
Richard Deeming9-Jan-19 8:12
mveRichard Deeming9-Jan-19 8:12 
QuestionFailing to call the put and post Web Api methods from the react js components Pin
simpledeveloper24-Dec-18 9:55
simpledeveloper24-Dec-18 9:55 
Questionget a function to countdown (from any number) to zero Pin
Member 1409810523-Dec-18 14:49
Member 1409810523-Dec-18 14:49 
QuestionRe: get a function to countdown (from any number) to zero Pin
Richard MacCutchan25-Dec-18 21:18
mveRichard MacCutchan25-Dec-18 21:18 
AnswerRe: get a function to countdown (from any number) to zero Pin
Bohdan Stupak9-Jan-19 19:40
professionalBohdan Stupak9-Jan-19 19:40 
Questionhow to get a js fuction to return html opening and closing tag Pin
Member 1409810522-Dec-18 17:34
Member 1409810522-Dec-18 17:34 
AnswerRe: how to get a js fuction to return html opening and closing tag Pin
Richard MacCutchan22-Dec-18 23:35
mveRichard MacCutchan22-Dec-18 23:35 
GeneralRe: how to get a js fuction to return html opening and closing tag Pin
Member 1409810523-Dec-18 14:31
Member 1409810523-Dec-18 14:31 
QuestionGet an html table multiple rows as a string URL for Ajax Pin
Member 1409585019-Dec-18 22:55
Member 1409585019-Dec-18 22:55 
AnswerRe: Get an html table multiple rows as a string URL for Ajax Pin
Afzaal Ahmad Zeeshan23-Dec-18 0:29
professionalAfzaal Ahmad Zeeshan23-Dec-18 0:29 
Questiondebug shopping cart project Pin
ghazabaz13-Dec-18 15:56
ghazabaz13-Dec-18 15:56 
Questione.target.value, switch-case operators Pin
ghazabaz6-Dec-18 19:22
ghazabaz6-Dec-18 19:22 
QuestionRe: e.target.value, switch-case operators Pin
Richard MacCutchan6-Dec-18 23:26
mveRichard MacCutchan6-Dec-18 23:26 
QuestionRe: e.target.value, switch-case operators Pin
ghazabaz7-Dec-18 3:47
ghazabaz7-Dec-18 3:47 
AnswerRe: e.target.value, switch-case operators Pin
Richard MacCutchan7-Dec-18 4:29
mveRichard MacCutchan7-Dec-18 4:29 
AnswerRe: e.target.value, switch-case operators Pin
Richard Deeming7-Dec-18 5:37
mveRichard Deeming7-Dec-18 5:37 

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.