|
Reid
|
Jan 25 2010, 10:54 AM
Post #1
|
È una trappola!
- Posts:
- 6,767
- Group:
- Developer
- Member
- #223,645
- Joined:
- October 30, 2006
- I'm Browsing With
- Firefox
|
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.phpWhere 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'> </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'> </td> </tr> </table> </div>
|