Click here to Skip to main content
15,499,958 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerMessage Closed Pin
25-Feb-22 6:40
MemberMember 1554804125-Feb-22 6:40 
AnswerMessage Closed Pin
25-Feb-22 6:41
MemberMember 1554804125-Feb-22 6:41 
AnswerRe: Creating a responsive menu Pin
Member 1554804125-Feb-22 6:44
MemberMember 1554804125-Feb-22 6:44 
AnswerRe: Creating a responsive menu Pin
Richard Deeming27-Feb-22 22:12
mveRichard Deeming27-Feb-22 22:12 
QuestionAdding auto expand functionality to collapsible script Pin
Member 1554681524-Feb-22 4:38
MemberMember 1554681524-Feb-22 4:38 
AnswerRe: Adding auto expand functionality to collapsible script Pin
Member 1554681524-Feb-22 10:52
MemberMember 1554681524-Feb-22 10:52 
QuestionProper decoding using Vanilla Javascript Pin
jkirkerx17-Feb-22 13:04
professionaljkirkerx17-Feb-22 13:04 
AnswerRe: Proper decoding using Vanilla Javascript Pin
Richard Deeming17-Feb-22 22:33
mveRichard Deeming17-Feb-22 22:33 
How are you generating that cookie value? It looks like URL-encoded JSON, but the JSON is invalid.
JavaScript
"{\"timeStamp\":\"02/17/2022 10:15:02\",\"coreMode\":\"open\",\"}"
That trailing quote before the closing brace doesn't match an opening quote. Attempting to parse the value will give you an error:
JavaScript
const value = JSON.parse(decodeURIComponent('{"timeStamp"%3A"02\%2F17\%2F2022 10%3A15%3A02"%2C"coreMode"%3A"open"%2C"}'));
// JSON.parse: unterminated string at line 1 column 56 of the JSON data




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Proper decoding using Vanilla Javascript Pin
jkirkerx18-Feb-22 7:49
professionaljkirkerx18-Feb-22 7:49 
GeneralRe: Proper decoding using Vanilla Javascript Pin
Richard Deeming24-Feb-22 1:21
mveRichard Deeming24-Feb-22 1:21 
GeneralRe: Proper decoding using Vanilla Javascript Pin
jkirkerx24-Feb-22 6:37
professionaljkirkerx24-Feb-22 6:37 
QuestionAngular JS A href in View source Pin
Member 367124116-Feb-22 2:36
MemberMember 367124116-Feb-22 2:36 
AnswerRe: Angular JS A href in View source Pin
Richard Deeming17-Feb-22 2:58
mveRichard Deeming17-Feb-22 2:58 
QuestionWhy is my last input box not centering (class: powerwall-battery-input)? Pin
WannaBeAWebDev11-Feb-22 15:20
MemberWannaBeAWebDev11-Feb-22 15:20 
AnswerRe: Why is my last input box not centering (class: powerwall-battery-input)? Pin
rnbergren15-Feb-22 4:03
Memberrnbergren15-Feb-22 4:03 
QuestionUsing modules in a regular PHP Web Application - function is undefined Pin
jkirkerx9-Feb-22 13:23
professionaljkirkerx9-Feb-22 13:23 
AnswerRe: Using modules in a regular PHP Web Application - function is undefined - Think I got it now Pin
jkirkerx9-Feb-22 14:25
professionaljkirkerx9-Feb-22 14:25 
AnswerRe: Using modules in a regular PHP Web Application - function is undefined Pin
Richard Deeming9-Feb-22 22:49
mveRichard Deeming9-Feb-22 22:49 
GeneralRe: Using modules in a regular PHP Web Application - function is undefined Pin
jkirkerx10-Feb-22 6:00
professionaljkirkerx10-Feb-22 6:00 
GeneralRe: Using modules in a regular PHP Web Application - function is undefined Pin
jkirkerx10-Feb-22 11:52
professionaljkirkerx10-Feb-22 11:52 
QuestionModules and scripts, common modules and scripts, just want to call some functions from a common external script, sort of ES6 Pin
jkirkerx28-Jan-22 11:29
professionaljkirkerx28-Jan-22 11:29 
AnswerRe: Modules and scripts, common modules and scripts, just want to call some functions from a common external script, sort of ES6 Pin
jkirkerx28-Jan-22 11:52
professionaljkirkerx28-Jan-22 11:52 
QuestionArea of ​​a 2d room Pin
Member 1550401118-Jan-22 2:29
MemberMember 1550401118-Jan-22 2:29 
SuggestionRe: Area of ​​a 2d room Pin
Richard MacCutchan18-Jan-22 2:37
mveRichard MacCutchan18-Jan-22 2:37 
QuestionHow to solve this in js Pin
Miraz Uddin17-Jan-22 19:57
MemberMiraz Uddin17-Jan-22 19:57 

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.