Welcome to Geeklog, Anonymous Thursday, November 07 2024 @ 12:08 pm EST
Geeklog Forums
notepad phpblock
Status: offline
remy
Forum User
Full Member
Registered: 06/09/03
Posts: 162
Location:Rotterdam & Bonn
The following code can be used as a phpblock. It shows a nice and small notepad using localStorage, which is local to the Browser. [not suitable for shared machines !]
<div>
<textarea id="gl_NotePad" placeholder="Type here, see it persist again …" rows="5" style="width:100%;"></textarea>
<script>
var glNote = document.getElementById('gl_NotePad');
glNote.onchange = function(){localStorage.setItem("geeklog",glNote.value);}
glNote.value = localStorage.getItem("geeklog");
</script>
</div>
Set it to display just below the user functions. Disable anonymous access.
Text Formatted Code
<div>
<textarea id="gl_NotePad" placeholder="Type here, see it persist again …" rows="5" style="width:100%;"></textarea>
<script>
var glNote = document.getElementById('gl_NotePad');
glNote.onchange = function(){localStorage.setItem("geeklog",glNote.value);}
glNote.value = localStorage.getItem("geeklog");
</script>
</div>
Set it to display just below the user functions. Disable anonymous access.
12
12
Quote
All times are EST. The time is now 12:08 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content