Solved

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

Posted on 2015-01-06
3
443 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
dashicon not showing on one website 13 23
PHP Form Calculate Total Price 10 42
ASP.NET MVC -Add authentication 2 21
DataTables + iCheck + pagination Issue 2 23
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

777 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