Location: PHPKode > scripts > Primes Factory > primes-factory/index.php
<html>
<head>
<title>PrimesFactory</title>
<script language="javascript1.2">
function go()
{
      op = document.primeform.opscombo.selectedIndex ;
      n = document.primeform.number.value ;
      
      if ( n.indexOf(",") != -1 && op != 0 )
      {
            msg = "Enter more numbers only for factorization." ;
            alert( msg );
            return ;
      }

      var path = "" ;

      switch( op )
      {
          case 0:
            path = "example1.php?number=" + n ;
          break;
          case 1:
            path = "example2.php?number=" + n ;
          break;
          case 2:
            path = "example3.php?number=" + n ;
          break;
          case 3:
            path = "example4.php?number=" + n ;
          break;
          case 4:
            path = "example5.php?number=" + n ;
          break;
      }

      window.location = path ;
}
</script>
</head>
<body>
<form name="primeform" method="get" action="example1.php" >
<table style="background-color:white;border: solid 1px black;">
<tr><td colspan="2">Insert one number or more separated by a comma:</td></tr>
<tr><td><input style="font-weight:bold;font-family:tahoma;" name="number" type="textbox" size="17" /></td></tr>
</tr>
<tr>
<td>
<select name="opscombo">
<option>Factorize
<option>Sieve
<option>Is Perfect ?
<option>Primes before
<option>Is Prime ?
</select>
</td>
    <td align=center><input onclick="javascript:go();" type="button" value="Go !" /></td>
</tr>
</table>
<a href="mailto:hide@address.com">mail me</a> or visit my <a href="http://malilla.supereva.it">site</a>
</body>
</html>
Return current item: Primes Factory