I have a static page with login and registration link.I want the user, by clicking on login , to call the Javascript function, which, in turn, displays the Login Form on the same page.
Although I can embed the entire HTML tag in document.write() , it is very dirty and I'm sure this is not the best practice for long HTML codes.
So how can I embed HTML codes in a JS function? and how can I control the positioning of the form on the page.
I am only looking for a Javascript solution, not jQuery
source share