Team:TU Delft/tools/table generator

From 2010.igem.org

(Difference between revisions)
Line 1: Line 1:
=Table Generator=
=Table Generator=
<html>
<html>
 +
  <form action="javascript:alert('success!');">
 +
    <div>
 +
      <input type="text" />
 +
 +
      <input type="submit" />
 +
    </div>
 +
  </form>
 +
  <span></span>
<script>
<script>
-
$("table_generator").submit(function() {
+
    $("form").submit(function() {
-
  alert('Handler for .submit() called.');
+
      if ($("input:first").val() == "correct") {
-
  return false;
+
        $("span").text("Validated...").show();
-
});
+
        return true;
-
 
+
      }
 +
      $("span").text("Not valid!").show().fadeOut(1000);
 +
      return false;
 +
    });
</script>
</script>
-
 
-
<form action="index.php" id="table_generator">
 
-
<table>
 
-
<tr>
 
-
<td># rows</td>
 
-
<td><input type="text" name="numrows" id="numrows" /></td>
 
-
</tr>
 
-
<tr>
 
-
<td># cols</td>
 
-
<td><input type="text" name="numcols" id="numcols" /></td>
 
-
</tr>
 
-
<tr>
 
-
<td colspan="2"><input type="submit" value="Generate" /></td>
 
-
</tr>
 
-
</table>
 
-
</form>
 
</html>
</html>

Revision as of 16:37, 4 August 2010

Table Generator