Skip to content
Sign upLog in
← Back to Community

Notes taking app

Profile icon
02lan

Its not the best but its still good

Voters
Profile icon
StephenYabut
Profile icon
maxina
Profile icon
OldWizard209
Profile icon
InvisibleOne
Profile icon
ch1ck3n
Profile icon
02lan
Comments
hotnewtop
Profile icon
02lan

It now stores your notes enjoy:).

Profile icon
QuickV

nice!... One idea is to make it so the notes stay (even if you refresh the page!)

Profile icon
02lan

@QuickV
Yea ive been trying to find out a way of doing that. But i've just started with front end and don't want to rush to backend. I don't know if i could store them in a json file instead of a database.

Profile icon
QuickV

I'm pretty sure you can save it without having to do something in backend. I haven't actually done that myself (since I'm terrible at coding), but a friend of mine has done that in a similar kind of project.

So I guess it's possible xD.

Profile icon
02lan

@QuickV
lol yea ill figure it out.

Profile icon
QuickV
Profile icon
JakeHu2020

@QuickV
@02lan
you can with localStorage (stores only for one user):

// Set Item localStorage['item_name'] = 'item_value' // get Item alert(localStorage['item_name']); // delete item localStorage.removeItem('item_name'); // clear storage localStorage.clear();
Profile icon
02lan

@JakeHu2020
that can work I can have all of the notes innerHTML stored in a array and store it in a localStorage.Then I can keep a count of how many notes there are and do a for loop and draw them out. I think i might just do that thank you.

Profile icon
JakeHu2020

@02lan
use JSON.stringify when inserting, because it turns all objects and functions to strings

Profile icon
QuickV

ah yes that's it!

@JakeHu2020

Profile icon
QuickV

hopefully that works!

@02lan

Profile icon
02lan

@QuickV
Yea it works for sure I had to fix some bugs. But there might be a small chance theres still a bug in there but idk. But it should save all your notes and save all your changes to your notes.

Profile icon
QuickV

Nice! An idea is to make the notes delete once nothing is in them (though I have no idea how to do that)[email protected]

Profile icon
02lan

@QuickV
wym nothing is in them and also when you delete them it saves the ones you deleted.So when you reload the window it should be gone.

Profile icon
QuickV

I meant when 0 characters are inside of a note, it should delete by itself, without the user having to delete them by pressing the "X".

@02lan

Profile icon
02lan

@QuickV
Why tho i mean you can leave it blank and, then edit it later.

Profile icon
QuickV

that is true lol...

@02lan

Profile icon
InvisibleOne

Nice

Profile icon
ch1ck3n

ooh n i c e