Tag Info

New answers tagged

2

Depending on which browsers you need to support, you may be able to take advantage of the HTML 5 template tag. The template tag allows you to keep your partial HTML elements in the HTML file but not have them rendered in the browser. In order to actually display the contents, you clone the template's contents and add it to the DOM using javascript. You can ...


5

Use a mvw (model/view/whatever) pattern model: "pure" javascript library modelling abstract concepts. This part usually contains objects & methods names related to the application domain (car business -> car objects / insurance contracts) and the data access logic. view: a custom language describing how your UI look like. Preferably, the language ...


0

My initial thoughts extract HTML from JS, and place HTML in HTML file (same with CSS) load JS in parent container's HTML file in JS file use JS/jQuery to show/hide DIVs in HTML as needed as per selection var use JS/jQuery to bind navigational events to buttons have navigational events populate table cells via assigned id attributes. A bit of a pain to ...


0

The one solution I have come up with is to create "View" Models. I create simple versions of the database models that do not include the reference to the parent class. These view models each have method to return the Database Version and a constructor that takes the database model as a parameter (viewmodel.name = databasemodel.name). This method ...



Top 50 recent answers are included