BC458Part VIBonus ChaptersFor NN4, the page uses (Cheap web hosting) the

BC458Part VIBonus ChaptersFor NN4, the page uses the tag and loads the content of the object from a separateHTML file (instrux.htm). One advantage I had with the tag was that I could assignan initial horizontal position of the help object with a JavaScript entity. The entity reachesinto the window.innerWidthproperty to set the leftattribute of the layer. This page has a lot of code to digest in one reading. Run the application, study the structureof the source code listing file, and re-read the previous explanations. It may take several read- ings for a mental picture of the application to form. Lessons LearnedAs soon as the external cross-platform API was in place, it helped frame a lot of the othercode in the main program. The APIs provided great comfort in that they encouraged me toreference a complex object fully in the main code as a platform-shared value (for example, the selectedObjand selectedStateLabelglobal variables). At the same time, I could refer- ence top-level elements (that is, non-nested objects) simply by their names when passingthem to API functions. In many respects, the harder task was defining the stylesheet attributes and syntax that bothbrowsers would treat similarly. In the case of the label objects, I couldn t reach complete par- ity in a cross-platform environment (the labels look different in NN4), and in the case of thehelpobject, I had to code the HTML separately for each platform. Therefore, when approach- ing this kind of project, work first with the HTML and CSS syntax to build the look that worksbest for all platforms. Then start connecting the scripted wires. You may have to adjust theCSS code if you find odd behavior in one platform or the other with your scripting, but start- ing with a good layout is still easier.

Leave a Reply