We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
[CODE] Anyone Can Type Box V2.; By random2205
Topic Started: Jan 25 2010, 10:54 AM (88 Views)
Reid
Member Avatar
È una trappola!

This topic has been moved from our official support board.

Originally posted by: random2205
[CODE
 
Anyone Can Type Box V2.]Code Name: Anyone Can Type Box Version 2

Description: Enhanced Version From The Last One, Now You Can Save Your Notes or Clear Your Notes.

Preview: http://s10.invisionfree.com/HTML_Test_Forum/index.php

Where it goes: First Part goes in your Javascript. Secon Part Put this in Headers & Body, where you want it. I placed mine above <% BOARD %> and below <% BOARD HEADER %>, <% NAVIGATION %>

Place This In Javascript
Code:
 
<script>
function createCookie(name,value,days)
{
if (days)
{
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name)
{
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++)
{
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

function eraseCookie(name)
{
createCookie(name,"",-1);
}
function saveIt(name)
{
var x = document.notes.notepad.value;
if (!x)
alert('Please fill in a value in the input box.');
else
createCookie(name,x,365);
}
window.onload = function() {
document.notes.notepad.value = readCookie('notecookie');
}
</script>



Place this in Headers & Body, where you want it. I placed mine above <% BOARD %> and below <% BOARD HEADER %>, <% NAVIGATION %>
Code:
 
<div class="tableborder">
<div class='maintitle' align='left'>Anyone Can Type In This</div>
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<th align="center" class='titlemedium'>&nbsp;</th>
</tr>
<tr>
<td class="row4"><form name="notes"><textarea name="notepad" rows="10" style="width: 100%;"></textarea></form>
<a href="javascript:saveIt('notecookie')">Save notes</a> | <a href="javascript:eraseCookie('notecookie')">Erase notes</a></td>
</tr>
<tr>
<td class='darkrow2'>&nbsp;</td>
</tr>
</table>
</div>
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Codes & Modifications · Next Topic »
Add Reply