Modify Custom.js to change a generated Hybrid App.
Custom.js is generated the first time you generate the Hybrid App package. It contains commonly used functions from the Sybase Unwired Platform API and instructions for modifying them. Any modifications you make in Custom.js override the default behavior of those functions. However, unlike other generated files, Custom.js is not overwritten the next time you regenerate your package. In this way, your custom code is preserved.
The customization in this tutorial adds your own image, such as a company logo, to the top of the application screen.
hwc.customAfterHybridAppLoad = function() { . . . var screenKey = getCurrentScreen(); var form = document.forms[screenKey + "Form"]; if (form) { var topOfFormElem = document.getElementById("topOf" + screenKey + "Form"); topOfFormElem.innerHTML = '<img alt="header" src="images/header.png">'; } }