New App Design Considerations Part 7 - Copying HTML

UPDATE: Copying HTML via innerHTML is a BAD IDEA!

See this post for why: Moving/Copying/Creating BS4 Slider Control

There are at least two other ways of accomplishing on the fly creation or copying of controls, or what appears to be new controls displaying on the screen.

One is to use jQuery to create the controls in the DOM with their respective on events. This would mean the code would have to know what the controls were that were being added. Copying HTML didn’t matter what controls, how many, or what attributes were included.

The third concept is to put all of the templates in the base form in the correct location and hide all but the currently active UI controls. I’ve organized my “template HTML” each with a head container, which I hide/unhide.

This makes for a very messy and almost impossible IDE screen. In my original concept, each template was on it’s own form, so the WYSWYG of the IDE did provide a nice view of the HTML to be embedded, but didn’t show how the template would look embedded in the base form.

Since as a developer I will work on one template at a time, I’ll hide all of the templates except the template I’m working on in the IDE and leave it that way. In the app in Main, I’ll just hide all of the templates, except the home menu template. This provides the WYSWYG IDE and works within the confines of AS.

I’d love to hear other ideas. :sun_with_face: