Reputation: 533
I have used document.createEvent()
to create event in javaScript in my application. I have IE11 on my machine. I have tested the application on my local, and code is working fine, and then I have deployed code change to DEV environment and tested the same on same browser and it's working over there as well. However, when I deployed my application on QC environment, I observed that it was throwing an exception in browser console. So, in QC environment this change is not working.
I have changed to window.event
and then it's working on all the environments.
We have struts based application, deployed on WebSphere app server.
Does anyone have idea why this issue happened? are there any configurations on app server which can cause this issue?
Thanks,
Jay Patel
Upvotes: 0
Views: 610
Reputation: 5115
This is a client-side behavior only, unrelated to WebSphere or Struts.
It sounds exactly like it's caused by IE choosing different "Compatibility Mode" settings for the different server environments you're connecting to. We've hit this ourselves because one of our environments is in our company's domain, while our other environments are in our customer's domain. e.g. dev.mycompany.com
vs. test.customer.com
.
IE uses a number of criteria to determine whether to render in "Compatibility Mode" vs "Standards Mode", including a Compatibility view list that is checked for specific domains, and whether or not a site is in your "Trusted Sites" group.
So I'd check your Trusted Sites for one or both of your environments, check Microsoft's lists (above link), potentially add or remove the appropriate domains from your local IE settings (e.g. as described in Fix site display issues with Compatibility view), or maybe be able to add headers to your HTML that will explicitly tell IE to use a certain mode.
You can also check which Zone the site belongs to via the IE File
> Properties
menu.
Another relevant Q&A: https://stackoverflow.com/a/13287226
Upvotes: 1