Created
March 24, 2010 01:32
-
-
Save fermion/341888 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="js/prototype.js" type="text/javascript"></script> | |
<script src="js/scriptaculous.js" type="text/javascript"></script> | |
<script> | |
document.observe('click', function(event){ | |
if(event.findElement().match('a.add_row')) { | |
event.stop(); | |
new Ajax.Request(this.href, { | |
onSuccess: function(transport){ | |
this.insert({before: transport.responseText}); | |
}.bind(this) | |
}); | |
} | |
}); | |
</script> | |
</head> | |
<body"> | |
<table id="unitdescription" border="1"> | |
<tr id="newSubTaskClicker"> | |
<td colspan="2"> | |
<a class='add_row' href="templates/someSnippet.html">Add row</a> | |
</td> | |
</tr> | |
</table> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment