05-02-2008, 18:05
|
|
|
|
חבר מתאריך: 14.09.05
הודעות: 319
|
|
איזו הודעה?
אין שום הודעת שגיא זה לא יוצר את העוגיה וזהו ו שום דבר לא עובד.
הקוד הוא :
קוד PHP:
<script type="text/javascript"> var Cookie = { Read: function(sName){ if(typeof sGetNames == "undefined" || sGetNames != document.cookie) sGetNames = document.cookie.split("; "); for(var i=0; i<sGetNames.length; i++){ if((sGetNames[i].search(sName+"=") == 0)){ return sGetNames[i].substring(sGetNames[i].search("=")+1, sGetNames[i].length); } } return false; }, Write: function(sName, sValue, iDays){ if(iDays){ var dCurrent = new Date(); dCurrent.setTime(dCurrent.getTime()+(iDays*24*60*6 0*1000)); var sExp = "; expires="+dCurrent.toGMTString(); }else sExp = ""; document.cookie = sName.concat("=", sValue, sExp, "; path=/"); } }; function toggleDivOL( elemID ) { var elem = document.getElementById( elemID ); if( (Cookie.Read(elemID) && Cookie.Read(elemID)==1) && elem.style.position != 'absolute' ) { Cookie.Write(elemID, 0); elem.style.position = 'absolute'; elem.style.left = '-4000px'; } else { Cookie.Write(elemID, 1); elem.style.position = 'relative'; elem.style.left = '0px'; }
</script>
וזהו הכפתור אין הודעת שגיאה אין כלום אני לוחץ על הכפתור ולא קורה כלום שום דבר.
קוד:
<a onclick="Cookie.Write('toHide', 1);" href="#" >hide</a>
_____________________________________
|