Click here to Skip to main content
15,860,943 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerMessage Closed Pin
25-Feb-22 5:41
Member 1554804125-Feb-22 5:41 
AnswerRe: Creating a responsive menu Pin
Member 1554804125-Feb-22 5:44
Member 1554804125-Feb-22 5:44 
AnswerRe: Creating a responsive menu Pin
Richard Deeming27-Feb-22 21:12
mveRichard Deeming27-Feb-22 21:12 
QuestionAdding auto expand functionality to collapsible script Pin
Member 1554681524-Feb-22 3:38
Member 1554681524-Feb-22 3:38 
AnswerRe: Adding auto expand functionality to collapsible script Pin
Member 1554681524-Feb-22 9:52
Member 1554681524-Feb-22 9:52 
QuestionProper decoding using Vanilla Javascript Pin
jkirkerx17-Feb-22 12:04
professionaljkirkerx17-Feb-22 12:04 
AnswerRe: Proper decoding using Vanilla Javascript Pin
Richard Deeming17-Feb-22 21:33
mveRichard Deeming17-Feb-22 21:33 
GeneralRe: Proper decoding using Vanilla Javascript Pin
jkirkerx18-Feb-22 6:49
professionaljkirkerx18-Feb-22 6:49 
I generated that cookie with PHP 7.4. For some reason it encodes the JSON, but it reads clean with PHP 7.4

I pulled that example out of storage in the browser, and cut off a large section just to use as an example.

This is the cookie straight out of the browser storage. Pretty ugly but that's just how it writes even with pretty print.
%7B%22timeStamp%22%3A%2202%5C%2F18%5C%2F2022%2009%3A41%3A35%22%2C%22coreMode%22%3A%22open%22%2C%22projectIntegrityCheck%22%3Afalse%2C%22projectNumber%22%3A%225342%22%2C%22projectType%22%3A%22poolspa%22%2C%22projectStage%22%3A%22designing%22%2C%22projectVersion%22%3A0%2C%22projectFinalVersion%22%3A0%2C%22projectJob%22%3A0%2C%22projectEmployeeId%22%3A91%2C%22projectEmployeeName%22%3A%22Jim%20Miller%22%2C%22projectCustomerId%22%3A%225324%22%2C%22projectCustomerName%22%3A%22Jim%20Kirker%202022021602%22%2C%22projectAddNumber%22%3A-1%2C%22projectSalesId%22%3A%2291%22%2C%22originalBookPrice%22%3A32761.2153%2C%22bookPrice%22%3A32761.2153%2C%22preBookPrice%22%3A32761.2153%2C%22contractAmount%22%3A0%2C%22inputId%22%3A%22%22%2C%22inputName%22%3A%22Selection%20Name%3A%22%2C%22inputPrice%22%3A0%2C%22inputMode%22%3A%22ADD%22%2C%22addTotal%22%3A0%2C%22bookDifference%22%3A0%2C%22userName%22%3A%22jimk%22%2C%22userType%22%3A%22Executive%22%2C%22versionNumber%22%3A-1%2C%22versionBookPrice%22%3A32761.2153%2C%22salesCommission%22%3A0%7D

The same cookie URL decoded ...
{"timeStamp":"02/18/2022 09:41:35","coreMode":"open","projectIntegrityCheck":false,"projectNumber":"5342","projectType":"poolspa","projectStage":"designing","projectVersion":0,"projectFinalVersion":0,"projectJob":0,"projectEmployeeId":91,"projectEmployeeName":"Jim Miller","projectCustomerId":"5324","projectCustomerName":"Jim Miller 2022021602","projectAddNumber":-1,"projectSalesId":"91","originalBookPrice":32761.2153,"bookPrice":32761.2153,"preBookPrice":32761.2153,"contractAmount":0,"inputId":"","inputName":"Selection Name:","inputPrice":0,"inputMode":"ADD","addTotal":0,"bookDifference":0,"userName":"jimk","userType":"Executive","versionNumber":-1,"versionBookPrice":32761.2153,"salesCommission":0}

Maybe reading this cookie with JavaScript is not a good idea. I found that I don't really need this since my projectClose.php will read the cookie and close the project.
If it ain't broke don't fix it
Discover my world at jkirkerx.com

GeneralRe: Proper decoding using Vanilla Javascript Pin
Richard Deeming24-Feb-22 0:21
mveRichard Deeming24-Feb-22 0:21 
GeneralRe: Proper decoding using Vanilla Javascript Pin
jkirkerx24-Feb-22 5:37
professionaljkirkerx24-Feb-22 5:37 
QuestionAngular JS A href in View source Pin
Member 367124116-Feb-22 1:36
Member 367124116-Feb-22 1:36 
AnswerRe: Angular JS A href in View source Pin
Richard Deeming17-Feb-22 1:58
mveRichard Deeming17-Feb-22 1:58 
QuestionWhy is my last input box not centering (class: powerwall-battery-input)? Pin
WannaBeAWebDev11-Feb-22 14:20
WannaBeAWebDev11-Feb-22 14:20 
AnswerRe: Why is my last input box not centering (class: powerwall-battery-input)? Pin
rnbergren15-Feb-22 3:03
rnbergren15-Feb-22 3:03 
QuestionUsing modules in a regular PHP Web Application - function is undefined Pin
jkirkerx9-Feb-22 12:23
professionaljkirkerx9-Feb-22 12:23 
AnswerRe: Using modules in a regular PHP Web Application - function is undefined - Think I got it now Pin
jkirkerx9-Feb-22 13:25
professionaljkirkerx9-Feb-22 13:25 
AnswerRe: Using modules in a regular PHP Web Application - function is undefined Pin
Richard Deeming9-Feb-22 21:49
mveRichard Deeming9-Feb-22 21:49 
GeneralRe: Using modules in a regular PHP Web Application - function is undefined Pin
jkirkerx10-Feb-22 5:00
professionaljkirkerx10-Feb-22 5:00 
GeneralRe: Using modules in a regular PHP Web Application - function is undefined Pin
jkirkerx10-Feb-22 10:52
professionaljkirkerx10-Feb-22 10: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 10:29
professionaljkirkerx28-Jan-22 10: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 10:52
professionaljkirkerx28-Jan-22 10:52 
QuestionArea of ​​a 2d room Pin
Member 1550401118-Jan-22 1:29
Member 1550401118-Jan-22 1:29 
SuggestionRe: Area of ​​a 2d room Pin
Richard MacCutchan18-Jan-22 1:37
mveRichard MacCutchan18-Jan-22 1:37 
QuestionHow to solve this in js Pin
Miraz Uddin17-Jan-22 18:57
Miraz Uddin17-Jan-22 18:57 
AnswerRe: How to solve this in js Pin
Richard Deeming17-Jan-22 21:34
mveRichard Deeming17-Jan-22 21:34 

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.