W
W
weranda2016-02-17 17:48:06
JavaScript
weranda, 2016-02-17 17:48:06

What is the best way to call/embed the form: through JS or Html?

Greetings
I'm thinking about how best to display the feedback form on the site. The form is displayed in a modal window. There are two options:

  1. Push the entire form code into a JS file, it will be stored there and appear in the page markup only when the button is clicked
  2. Embed the form directly and immediately in the Html code.

It is clear that you should not bother too much in this matter, but perhaps there are, for example, practices unfamiliar to me, according to which it is better to do this and not otherwise. What do you think?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Shvedov, 2016-02-17
@weranda

Immediately embed in the page with display:none. Show when needed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question