On click button - template rendering

hello fellow coders

I have a problem while i need to render a template which has already been defined on the click of a button.

for eg : i have defined the template as follows :
template name="register"
h1 Register page /h1
/template
and i have created a button like : button id=“register” Register /butto

now i want to render the template register when one clicks the button “register”

Any help on this regard would be greatly appreciated

Thanks
Kartik

Take a look at the following thread for one example: