Hi folks, I'm looking for some insight to help explain to me why I might be encountering this issue and how to tackle it. I just want to know. My issue is this.... I have a rather simple DS form(PA90.1) in our 'new' OS developement system. The code is split into 2 parts. Part 1 is encapsolated inside of an if condition: if(portalWnd.oBrowser.isIE) and part two is encapsolated inside of an if condition: if(portalWnd.oBrowser.isChrome). The form works just fine for both IE and Chrome, performing the customizations; in our OS Dev system. Then I was then asked to make this form, with the same (universal) code; work in our existing 'old' Ming.le system. In Ming.le on a page load, the code doesn't recoginize the 'portalWnd.oBrowser' value and skips over all the customized code. At first I added the FORM_OnInit function to the code and evaluated the values of navigator.userAgent and appName. Then followed some of the processing code found within the xmlcommon.js. This gave me the values that I was looking for but the form still doesn't want to follow the logic code for any additional form actions. It's as if the 'if conditions' must be 'inside' of a function, not the other way around. I later changed my FORM_OnInit function (before transactional state) to FORM_OnAfterDataInit(after transactional state) which gave me the correct values for the portalWnd.oBrowser conditions; but the form still doesn't process any of the functions with the segregated code. Do I have to reverse all the code for Ming.le; placing the if statements within the functions? Am I missing something? Is there another way to accomplish my task? Why do the two environment behave differently?
//Check if browser is IE if (navigator.userAgent.search("MSIE") & gt; = 0) { // insert conditional IE code here } //Check if browser is Chrome else if (navigator.userAgent.search("Chrome") & gt; = 0) { // insert conditional Chrome code here }
WOW, that was quick! I will give it a try - THANK YOU!
Still working on the gt; portion of the command. I will post my results if this works.
Worked beautifully with the 'greater than or equal to' and adding the 'else' to my condition. I had to change the search from 'MSIE' to 'Trident' for IE11. I'm now adding an extra condition to send a message back that tells the end user if they are using a non-supported browser. Thanks!