Fri, 17 May 2024


How to create a VML scale?

By: Anton, NetArt Media
Fri, 18 March 2022

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<xml:namespace prefix="v" />
<style>
v\:* {behavior=url(#default#VML)}
o\:* {behavior:url(#default#VML);}
.scaletd{font-family:verdana;font-size:7pt;color:white}
</style>
<script>
var vml_scale_1='<v:shape fillcolor=#ffffff strokecolor=#ffffff style="position:relative;left:-1;width:100;height:7" coordsize="100,100" path = "m 0,0 l 0,-80 0,0 10,0 10,-55 10,0 20,0 20,-55 20,0 30,0 30,-55 30,0 40,0 40,-55 40,0 50,0 50,-55 50,0 60,0 60,-55 60,0 70,0 70,-55 70,0 80,0 80,-55 80,0 90,0 90,-55 90,0 100,0 x e"> </v:shape> ';
var vml_scale_2='<v:shape fillcolor=#ffffff strokecolor=#ffffff style="position:relative;left:-1;width:100;height:7" coordsize="100,100" path = "m 0,0 l 0,-80 0,0 10,0 10,-55 10,0 20,0 20,-55 20,0 30,0 30,-55 30,0 40,0 40,-55 40,0 50,0 50,-55 50,0 60,0 60,-55 60,0 70,0 70,-55 70,0 80,0 80,-55 80,0 90,0 90,-55 90,0 100,0 100,-80 100,0x e"> </v:shape> ';

function generateScale()

{
var vmlScale="";
var vmlGraphic="";

vmlScale+="<table class=scaletable ><tr><td><table width=600 style='position:relative;top:6;left:-45' ><tr>";
for(u=0;u<6;u++)
{

vmlScale+="<td class=scaletd width=120 align=center>"+ (213645)+"</td>";
if(u==5) continue;
if(u<4) vmlGraphic+=vml_scale_1;else vmlGraphic+=vml_scale_2;
}
vmlScale+="</tr></table>";
//alert(""+vmlGraphic);
vmlScale+="</td></tr><tr style='position:relative;top:0;left:-2'><td >"+vmlGraphic+"</td> </tr></table>";
return vmlScale;
}

function init()
{
scale.innerHTML="<br><br><br>"+generateScale();
}

</script>
</head>
<body bgcolor=#224452 onload=init()>

<div id=scale></div>
</body>
</html>


Category: Other
Share this post:



See All Scripts






Subscribe for our newsletter

Receive the latest blog posts direct in your mailbox