NOTICE: The TGIMBA git hub repository has been corrupted and I had to start over. The link to the repository is here -> Git Code Commit
After this, the next step is to load the HTML login view (to further reduce duplication, I am using the same views). To load the login view, I am using pretty much the same code. The differences are how the ‘contentDiv’ is being accessed and how it is loaded.
‘contentDiv ‘ is accessed in Display.js
It is loaded in ServerCalls.js -> GetView(args). GetView(args) calls a central JQuery Ajax call I have borrowed from previous code base.
To share the login view, I had to make the title dynamic. More specifically:
- I replaced the previous title with a label that has an id.
- I set the title for the JQuery code when the view loads
I then added ‘IsJQueryClient()’ to the common Utilities.js module to determine which client to load.
- If the JQuery client launches via the document.ready handler, I set the session client as JQuery.
I am handling the logged in/not logged via an alert for now. I will decide how to handle the common views when I get into a couple of more pages.
The next post will be about adding a React JS login page. Remember, to make this interesting and learn as much as possible about the ‘hot’ web client technologies, I am creating each page in each technology.