-
-
Save DevotionGeo/a24ff248f9f137968e86 to your computer and use it in GitHub Desktop.
Revisions
-
codepo8 revised this gist
Aug 26, 2010 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,14 +2,13 @@ // test for localStorage support if(('localStorage' in window) && window['localStorage'] !== null){ var f = document.getElementById('mainform'); // test with PHP if the form was sent (the submit button has the name "sent") <?php if(isset($_POST['sent']))){?> // get the HTML of the form and cache it in the property "state" localStorage.setItem('state',f.innerHTML); // if the form hasn't been sent... <?php }else{ ?> -
codepo8 revised this gist
Aug 26, 2010 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,4 +20,5 @@ <?php } ?> } </script> -
codepo8 renamed this gist
Aug 26, 2010 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
codepo8 revised this gist
Aug 26, 2010 . 1 changed file with 22 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,23 @@ <script> // test for localStorage support if(('localStorage' in window) && window['localStorage'] !== null){ // test with PHP if the form was sent (the submit button has the name "sent") <?php if(isset($_POST['sent']))){?> // get the HTML of the form and cache it in the property "state" var f = document.getElementById('mainform'); localStorage.setItem('state',f.innerHTML); } // if the form hasn't been sent... <?php }else{ ?> // check if a state property exists and write back the HTML cache if('state' in localStorage){ f.innerHTML = localStorage.getItem('state'); } <?php } ?> }</script> -
codepo8 revised this gist
Aug 25, 2010 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,4 +9,5 @@ f.innerHTML = localStorage.getItem('state'); } <?php } ?> } </script> -
codepo8 revised this gist
Aug 25, 2010 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ <script> if(('localStorage' in window) && window['localStorage'] !== null){ <?php if(isset($_POST['sent']))){?> var f = document.getElementById('mainform'); localStorage.setItem('state',f.innerHTML); } <?php }else{ ?> if('state' in localStorage){ f.innerHTML = localStorage.getItem('state'); } <?php } ?> -
codepo8 revised this gist
Aug 25, 2010 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ <script> <?php if(isset($_POST['sent']))){?> var f = document.getElementById('mainform'); if(this.localStorage){ localStorage.setItem('state',f.innerHTML); } <?php }else{ ?> if(this.localStorage && localStorage.getItem('state')){ f.innerHTML = localStorage.getItem('state'); } <?php } ?> -
codepo8 revised this gist
Aug 25, 2010 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,12 @@ <script> <?php if(isset($_POST['sent']))){?> var f = document.getElementById('mainform'); if(localStorage){ localStorage.setItem('state',f.innerHTML); } <?php }else{ ?> if(localStorage && localStorage.getItem('state')){ f.innerHTML = localStorage.getItem('state'); } <?php } ?> </script> -
codepo8 created this gist
Aug 25, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ <?php if(isset($_POST['sent']))){?> var f = document.getElementById('mainform'); if(localStorage){ localStorage.setItem('state',f.innerHTML); } <?php }else{ ?> if(localStorage && localStorage.getItem('state')){ f.innerHTML = localStorage.getItem('state'); } <?php } ?>