javascript - how to use common inputs for two forms? -
i want create landing page has 2 form 1 login , foe register. design following fig.(i try explain in fig.) , want use nested form. login form inside registration form.
when user click on login submit data login.jsp , register button submit register.jsp
i know nested form not possible in html other method available in javascript or jsp can implement functionality.
so want use these email , password inputs login form , registration form also.
__________________________________________ | | | ___________________________ | | | | | | | | | | | email | | | | | | | | | | | | | login | | | | | | | password | | | | | | | | | | | |___________________________| | | | | | | first name | | | | | | last name | | | | | | birth day | | | | register | |__________________________________________|
thank you.
use single form submits user.jsp
, branch based on submit button (<input type="submit" name="login" value="login">
or <input type="submit" name="register" value="register">
) appears in submitted data.
ignore fields don't care if login branch followed.
Comments
Post a Comment