Location: PHPKode > scripts > bezier > bezier/index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>PHP Bezier By Reza Salehi...</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>
<body>
<form name="form1" method="post" action="sample.php">
  <table width="432" border="0" cellpadding="5" cellspacing="5" bgcolor="#FFFFFF">
    <tr bgcolor="#CCCCCC"> 
      <td width="111" height="24"><div align="center"><strong>A</strong></div></td>
      <td width="523"><strong><em>X0:</em></strong> <input value="-60" name="x0" type="text" id="x0" size="10" maxlength="10"> 
        <em><strong>Y0</strong></em>: 
        <input name="y0" type="text" value="-70" id="y0" size="10" maxlength="10"></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td height="24"><div align="center"><strong>B</strong></div></td>
      <td><strong><em>X1:</em></strong> <input name="x1" value="-50" type="text" id="x1" size="10" maxlength="10"> 
        <em><strong>Y1</strong></em>: 
        <input name="y1" type="text" id="y1" value="30" size="10" maxlength="10"></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td><div align="center"><strong>C</strong></div></td>
      <td><strong><em>X2:</em></strong> 
        <input name="x2" type="text" id="x2" value="0" size="10" maxlength="10"> 
        <em><strong>Y2:</strong></em> <input name="y2" value="50" type="text" id="y2" size="10" maxlength="10"></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td><div align="center"><strong>D</strong></div></td>
      <td><strong><em>X3: </em></strong> <input name="x3" value="60" type="text" id="x3" size="10" maxlength="10"> 
        <strong><em> Y3:</em></strong> <input name="y3" type="text" value="-20" id="y3" size="10" maxlength="10"></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td>&nbsp;</td>
      <td> <div align="right"> 
          <input name="Submit" type="submit" onClick="MM_validateForm('x0','','R','y0','','R','x1','','R','y1','','R','x2','','R','y2','','R','x3','','R','y3','','R');return document.MM_returnValue" value="Submit">
        </div></td>
    </tr>
  </table>
</form>
<p>&nbsp;</p>
</body>
</html>
Return current item: bezier