The scripts for remembering your personal pic Url in cookies
This code I suggest is put near the top, in the header
<script language="Javascript">
<!--
function ReadCookie(cookieName){
var theCookie=""+document.cookie;
var ind=theCookie.indexOf(cookieName);
if (ind==-1 || cookieName=="") return "";
var ind1=theCookie.indexOf(';',ind);
if (ind1==-1) ind1=theCookie.length;
return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}
var today = new Date();
expiry = new Date(today.getTime() + 6*60*24*60*60*1000);
function SetCookie (name, value){
document.cookie=name + "=" + escape (value) + "; expires=" + expiry.toGMTString();
}
// -->
</script> |
This code in your "Text Formatting" code
| document.write("<a href='javascript:PersonalPic()'>PersonalPic</a><font size='-2'>[<a href='javascript:chgppic()'>url</a>]</font> ") |
I placed the [url] link next to the PersonalPic link cause I couldn't think of anything else.
and this one can go anyway in your "Text Formatting" code
function chgppic(){
var ppicurl=ReadCookie("fid170347ppic");
var url=prompt("Enter the URL of your Personal Picture.", ppicurl);
if (url){SetCookie("fid170347ppic", url);}
}
function PersonalPic(){
if(document.all.message.type=="hidden"){alert("Unable to edit message in \"Preview Mode\"!")}
else{
var ppicurl=ReadCookie("fid170347ppic");
if (ppicurl > ""){document.all.message.value=document.all.message.value + '<img id=input src="'+ppicurl+'">';}
else{void(PPic=prompt("Enter the URL of your Personal Picture.", "http://"));
if(PPic)document.all.message.value=document.all.message.value + '<img id=input src="'+PPic+'">';}
document.all.message.focus()
}
} |
