Adds a hyperlink to the specified parent and invokes the given function when the link is clicked.