Solved

IE11 not displaying vb.net page design properly On without compatible mode.

Posted on 2015-01-06
3
429 Views
Last Modified: 2015-01-07
Hi I am using IE11, i have used dynamic tables in vb.net code and i am showing hidden
columns on radio button change. it used to work fine on IE9 but i am having issue on
IE11.If I run code on IE11 with compatible mode then It works well But without
compatible mode,Design is messed up.I am attaching my Dotnet code,Please run on VS2010
and change radio button and see difference on IE11 With Compatible and Without
compatible mode.Please help me asap.
Proj1.zip
0
Comment
Question by:Sudhanshum
3 Comments
 
LVL 35

Assisted Solution

by:Robert Schutt
Robert Schutt earned 250 total points
ID: 40533386
setting style.display to "block" is not the default for table cells. Seems to work a lot better if you just use an empty string:
       function showDisplay() {

           var obj1;
           var obj2;
           var obj3;
           var obj4;
           //Box2
           obj1 = document.getElementById("B2Header");
           obj2 = document.getElementById("B2Header2");
           obj3 = document.getElementById("B2Header1");

           obj1.style.display = "";
           obj2.style.display = "";
           obj3.style.display = "";
           var i;
           for (i = 1; i <= 2; i++) {
               var objDep = document.getElementById("GVal" + i);
               objDep.style.display = "";
           }

           //Box3
           obj1 = document.getElementById("B3Header");
           obj2 = document.getElementById("B3Header2");
           obj3 = document.getElementById("B3SHeader1");
           obj4 = document.getElementById("B3PHeader1");

           obj1.style.display = "";
           obj2.style.display = "";
           obj3.style.display = "";
           obj4.style.display = "";
           var i;
           for (i = 1; i <= 2; i++) {
               var objDep = document.getElementById("OSVal" + i);
               objDep.style.display = "";
           }
           for (i = 1; i <= 2; i++) {
               var objDep = document.getElementById("OPVal" + i);
               objDep.style.display = "";
           }

           //Box4
           obj1 = document.getElementById("B4Header");
           obj2 = document.getElementById("B4Header2");
           obj3 = document.getElementById("B4SHeader1");
           obj4 = document.getElementById("B4PHeader1");

           obj1.style.display = "";
           obj2.style.display = "";
           obj3.style.display = "";
           obj4.style.display = "";
           var i;
           for (i = 1; i <= 2; i++) {
               var objDep = document.getElementById("WSVal" + i);
               objDep.style.display = "";
           }
           for (i = 1; i <= 2; i++) {
               var objDep = document.getElementById("WPVal" + i);
               objDep.style.display = "";
           }
       

       }

Open in new window

Note: I only changed the javascript, possibly also need to change code behind.
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 250 total points
ID: 40533924
Robert is right about the display property. the default value for the display property for the TD tag is table-cell and setting the display property on any table element will generally destabilize the page and screw up the table layout.  That is one of the reasons that using table for layout was abandoned by most developers a dozen years ago. The rendering is often unpredictable because the CSS parser may set the wrong method for the RenderObject of affected elements.

It is not surpriseing that compatibility mode works okay because older versions of IE did not follow the standards and the Trident rendering engine used by IE uses MS "standards" in compatibility mode instead of the recognized international standards everyone else follows. IE has been upgraded over the last 3 versions to be about 80-85% standards compliant.

Cd&
0
 

Author Closing Comment

by:Sudhanshum
ID: 40535562
It was really helpful.Thanks
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now