все рисует
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Raphael</title>
<script src="../js/jquery-1.9.1.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/raphael-min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<script type="text/javascript">
window.onload = function() {
var w = screen.width;
var h = screen.height;
var w2 = (w/2);
var h2 = (h/2);
var arrX =[];
var arrY =[];
var X = 0;
var Y = 0;
var ph = document.getElementById("placeholder");
var R = Raphael(ph, w, h);
function checkForm(){
X = parseInt(document.getElementById("cX").value);
Y = parseInt(document.getElementById("cY").value);
if(!X || !Y){
alert('"x" или "y" не число!')
}else{
add_to4ka();
}
return false;
}
function add_to4ka(){
var t3 = R.circle((w2+X*10), ((h2+Y*10)), 3);
arrX.push((w2+X*10));
arrY.push((h2+Y*10));
add_line();
}
function add_line(){
for(var i = 0; i<arrX.length; i++){
if(typeof arrX[i+1] !== "undefined" && typeof arrY[i+1] !== "undefined"){
R.path("M"+arrX[i]+","+arrY[i]+"L"+arrX[i+1]+","+arrY[i+1]);
}
}
}
var myForm = document.getElementById('myForm');
myForm.onsubmit = checkForm;
}
</script>
<div id="placeholder">
<form id = "myForm">
x = <input type = "text" name = "cX" id = "cX">
y = <input type = "text" name = "cY" id = "cY">
<input type = "submit" value = "go">
</form>
</div>
</body>
</html>