Topic: how to include a subpage in a main page

hi everyone,
     
               i am associated with an accounting project now .what my issue is that ,there is a link called 'add account'.what i want is that when i clicks on it the subpage should come as an extension in the same page when i clicks it again it should be same as before.can anyone throw some light on this problem??

Re: how to include a subpage in a main page

Hello,

You could put your create account subpage in a div in your current page, hide this div (directly with CSS or with jQuery for instance) and define a onclick event on your "add account" link that would show this div. Then you can either have your create account form submit normally (in the account controller create method, you just do a redirect :back ; when there is an error in the creation, you'd have to force the display of the div) or through ajax.

Re: how to include a subpage in a main page

thank you