Graf s vyu₧itφm VML a JavaScriptu

Nynφ vytvo°φme sloupcov² graf (4 sloupce) pomocφ VML a JavaScriptu, kter² bude podobn² tomuto:
graf
Zdrojov² k≤d
<form name="form_graf">
<label>a:</label><input type="text" value="0" name="a" /><br />
<label>b:</label><input type="text" value="0" name="b" /><br />
<label>c:</label><input type="text" value="0" name="c" /><br />
<label>d:</label><input type="text" value="0" name="d" /><br />
<input type="button" onClick="graf()" value="vytvo°"/>
</form>
<script language="JavaScript" type="text/javascript">
function graf(){
document.all.a_graf.innerHTML= "<v:rect style=\"width:20px;height:"+document.form_graf.a.value+"px\" fillcolor=\"yellow\"><v:textbox>a</v:textbox></v:rect>"
document.all.b_graf.innerHTML= "<v:rect style=\"width:20px;height:"+document.form_graf.b.value+"px\" fillcolor=\"green\"><v:textbox>b</v:textbox></v:rect>"
document.all.c_graf.innerHTML= "<v:rect style=\"width:20px;height:"+document.form_graf.c.value+"px\" fillcolor=\"blue\"><v:textbox>c</v:textbox></v:rect>"
document.all.d_graf.innerHTML= "<v:rect style=\"width:20px;height:"+document.form_graf.d.value+"px\" fillcolor=\"red\"><v:textbox>d</v:textbox></v:rect>"
}
</script>
<span id="a_graf"></span>
<span id="b_graf"></span>
<span id="c_graf"></span>
<span id="d_graf"></span>
Po kliknutφ na tlaΦφtko se vyvolß funkce graf(), kterß zapφÜe pomocφ document.all 4 obdΘlnφky o v²Üce definovanΘ ve formulß°i.

FuknΦnφ ukßzka

Tento skript funguje jen v prohlφ₧eΦi Microsoft Internet Explorer 5.0 a vyÜÜφm