Location: PHPKode > projects > AIE - Ajax Image Editor > aie/fontselectorbeispiel.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Akoma - Fontlist</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
.tdhover {
	border: 1px solid #7C7C7C;
}
.fontbutton {
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-style: solid;
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
	border-top-color: #D4D4D4;
	border-right-color: #333333;
	border-bottom-color: #333333;
	border-left-color: #D4D4D4;
}
-->
</style>
<script language="javascript1.2" type="text/javascript">
<!--
var font="arial.ttf";
var fontstring="Heute ist ein schöner Tag";
function startfontselector(){
	document.getElementById("fontbuttonimage").src='fontpreview.php?font='+font+'&fontstring='+fontstring;
	document.getElementById("fontselectoriframe").src="fontlist.php?fontstring="+fontstring+"&selected="+font;
}
function zeigefontselector(){
	var fsd=document.getElementById("fontselectordiv");
	var fbi=document.getElementById("fontbuttonimage");
	var xpos = fbi.offsetLeft;
	var ypos = fbi.offsetTop;
	var Eltern = fbi.offsetParent;
	while ( Eltern ) {
		xpos = xpos + Eltern.offsetLeft;
		ypos = ypos + Eltern.offsetTop;
		Eltern = Eltern.offsetParent;
	}
	fsd.style.left=(xpos-1)+"px";
	fsd.style.top=(ypos+32+1)+"px";
	fsd.style.visibility="visible";
	oldmousedown = document.onmousedown;
	document.onmousedown = function () {
		versteckefontselector();
	}
}
function versteckefontselector(){
	var fsd=document.getElementById("fontselectordiv");
	fsd.style.visibility="hidden";
	document.onmousedown = oldmousedown;
	
}
function setzefont(nfont){
	versteckefontselector();
	font=nfont;
	document.getElementById("fontbuttonimage").src='fontpreview.php?font='+nfont+'&fontstring='+fontstring;
}
-->
</script>
</head>

<body onload="startfontselector();">
<div id="fontselectordiv" style="position:absolute; left:132px; top:16px; width:221px; height:200px; z-index:1; border:1px solid #000000; background-color:#FFFFFF; visibility:hidden">
<iframe src="about:blank" frameborder="0" width="100%" height="100%" scrolling="auto" name="fontselectoriframe" id="fontselectoriframe"></iframe>
</div>
Font:<span id="fontselector"><a href="javascript:;" id="fontbuttonlink" onClick="zeigefontselector();"><img id="fontbuttonimage" border="0" class="fontbutton" /></a></span>
</body>
</html>
Return current item: AIE - Ajax Image Editor