Quantcast
Channel: Internet Explorer Web Development forum

Bootstrap table not working in Internet Explorer but works in Edge - Table is squeezed in IE

$
0
0

Using jQuery dialog box I am displaying data using bootstrap table, it works fine in other browsers like Chrome, Edge, but not in any version of IE.

If I open in Edge to view that table it is working, then I'm going to IE and reload after opening in Edge it works fine.

I'm confused like first time in Internet Explorer it is not working after Edge it works fine in IE as well.

It is little bit urgent anyone please let me know where I'm missing.


How to disable the "Open or Save prompt" in IE when downloading a file? I want the files to be saved automatically

$
0
0

Hi,

I am working on an Automation project where I download some files. I work with C# and Selenium.

When I use IE, I get this prompt asking whether to save the file or Open the file every time whenever a download.

I want the files to be saved automatically without any manual intervention.

Is there a setting in IE or can this be done through C#?

I am okay with registry entries solutions also, if any.

-Note: I am using the latest IE 11.

Thanks,

Saranya

Read Excel to ASP.NET MCV

$
0
0

I new in this topic .Start learning .What I want to do is read Excel file in my Desktop to web pages.

This code just take from some site.When Run it error with message "HTTP 404" Not found.

1. HomeController code.

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Test_WebMCV3.Models;

namespace Test_WebMCV3.Controllers
{
    public class HomeController : Controller
    {

        public ActionResult ImportExcel()
        {


            return View();
        }
        [ActionName("Importexcel")]
        [HttpPost]
        public ActionResult Importexcel1()
        {


            if (Request.Files["FileUpload1"].ContentLength > 0)
            {
                string extension = System.IO.Path.GetExtension(Request.Files["FileUpload1"].FileName).ToLower();
                string query = null;
                string connString = "";




                string[] validFileTypes = { ".xls", ".xlsx", ".csv" };

                string path1 = string.Format("{0}/{1}", Server.MapPath("~/first.xlsx"), Request.Files["FileUpload1"].FileName);
                if (!Directory.Exists(path1))
                {
                    Directory.CreateDirectory(Server.MapPath("~/App_Data/first.xlsx"));
                }
                if (validFileTypes.Contains(extension))
                {
                    if (System.IO.File.Exists(path1))
                    { System.IO.File.Delete(path1); }
                    Request.Files["FileUpload1"].SaveAs(path1);
                    if (extension == ".csv")
                    {
                        DataTable dt = Utility.ConvertCSVtoDataTable(path1);
                        ViewBag.Data = dt;
                    }
                    //Connection String to Excel Workbook  
                    else if (extension.Trim() == ".xls")
                    {
                        connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path1 + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=2\"";
                        DataTable dt = Utility.ConvertXSLXtoDataTable(path1, connString);
                        ViewBag.Data = dt;
                    }
                    else if (extension.Trim() == ".xlsx")
                    {
                        connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path1 + ";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=2\"";
                        DataTable dt = Utility.ConvertXSLXtoDataTable(path1, connString);
                        ViewBag.Data = dt;
                    }

                }
                else
                {
                    ViewBag.Error = "Please Upload Files in .xls, .xlsx or .csv format";

                }

            }

            return View();
        }


    }
}


2.Models Utility

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Data.OleDb;

namespace Test_WebMCV3.Models
{
    public class Utility
    {
        public static DataTable ConvertCSVtoDataTable(string strFilePath)
        {
            DataTable dt = new DataTable();
            using (StreamReader sr = new StreamReader(strFilePath))
            {
                string[] headers = sr.ReadLine().Split(',');
                foreach (string header in headers)
                {
                    dt.Columns.Add(header);
                }

                while (!sr.EndOfStream)
                {
                    string[] rows = sr.ReadLine().Split(',');
                    if (rows.Length > 1)
                    {
                        DataRow dr = dt.NewRow();
                        for (int i = 0; i < headers.Length; i++)
                        {
                            dr[i] = rows[i].Trim();
                        }
                        dt.Rows.Add(dr);
                    }
                }

            }


            return dt;
        }

        public static DataTable ConvertXSLXtoDataTable(string strFilePath, string connString)
        {
            OleDbConnection oledbConn = new OleDbConnection(connString);
            DataTable dt = new DataTable();
            try
            {

                oledbConn.Open();
                using (OleDbCommand cmd = new OleDbCommand("SELECT * FROM [Sheet1$]", oledbConn))
                {
                    OleDbDataAdapter oleda = new OleDbDataAdapter();
                    oleda.SelectCommand = cmd;
                    DataSet ds = new DataSet();
                    oleda.Fill(ds);

                    dt = ds.Tables[0];
                }
            }
            catch
            {
            }
            finally
            {

                oledbConn.Close();
            }

            return dt;

        }
    }
}  

3.View.cshtml

@using System.Data;  

@{  
    ViewBag.Title = "ImportExcel";  
    Layout = "~/Views/Shared/_Layout.cshtml";  
}  <h2>ImportExcel</h2>  <!--[if !IE]><!-->  <style type="text/css">  
  /* Generic Styling, for Desktops/Laptops */  
table {  
  width: 100%;  
  border-collapse: collapse;  
}  
/* Zebra striping */  
tr:nth-of-type(odd) {  
  background: #eee;  
}  
th {  
  background: #333;  
  color: white;  
  font-weight: bold;  
}  
td, th {  
  padding: 6px;  
  border: 1px solid #ccc;  
  text-align: left;  
}  
/* 
Max width before this PARTICULAR table gets nasty 
This query will take effect for any screen smaller than 760px 
and also iPads specifically. 
*/  
@@media only screen and (max-width: 760px),  
(min-device-width: 768px) and (max-device-width: 1024px)  {  
 /* Force table to not be like tables anymore */  
 table, thead, tbody, th, td, tr {  
  display: block;  
 }  
 /* Hide table headers (but not display: none;, for accessibility) */  
 thead tr {  
  ;  
  top: -9999px;  
  left: -9999px;  
 }  
 tr { border: 1px solid #ccc; }  
 td {  
  /* Behave  like a "row" */  
  border: none;  
  border-bottom: 1px solid #eee;  
  ;  
  padding-left: 50%;  
 }  
 td:before {  
  /* Now like a table header */  
  ;  
  /* Top/left values mimic padding */  
  top: 6px;  
  left: 6px;  
  width: 45%;  
  padding-right: 10px;  
  white-space: nowrap;  
 }  
 /* 
 Label the data 
 */  
        td:before {  
            content: attr(data-title);  
        }  
}  </style>  <!--<![endif]-->  
@using (Html.BeginForm("ImportExcel","Home",FormMethod.Post,new { enctype = "multipart/form-data" } ))  
{  <table>  <tr><td>Excel file</td><td><input type="file" id="FileUpload1" name="FileUpload1" /></td></tr>  <tr><td></td><td><input type="submit" id="Submit" name="Submit" value="Submit" /></td></tr>  </table>  
}  <div>  <table id="">  
            @if (ViewBag.Data != null)  
            {  <thead>  
                @foreach (DataColumn column in (ViewBag.Data as System.Data.DataTable).Columns)  
                {  <text>@column.ColumnName.ToUpper()</text>  
                }  </thead>  

                if ((ViewBag.Data as System.Data.DataTable).Rows.Count > 0)  
                {  
                    foreach (DataRow dr in (ViewBag.Data as System.Data.DataTable).Rows)  
                    {  <tr>  
                   @foreach (DataColumn column in (ViewBag.Data as System.Data.DataTable).Columns)  
                   {  <td data-title='@column.ColumnName'>  
                        @dr[column].ToString()   </td>  
                   }  </tr>  
                    }  
                }  
                else  
                {  
                    int count = (ViewBag.Data as System.Data.DataTable).Columns.Count;  <tr>  <td colspan='@count' style="color:red;" >  
                               No Data Found.  </td>  </tr>  
                }  
            }  
            else  
            {  
                if (ViewBag.Error != null)  
                {  <tr>  <td  style = "color:red;" >  
       @(ViewBag.Error != null ? ViewBag.Error.ToString() : "")  </td >  </tr >  
                    }  
                }  </table>  </div>  

somebody can show which code is mistake.

Thank

MSHTML image resizing problem

$
0
0

My app hosts an MSHTML based editor for composing emails.  I've recently noticed a problem with the resizing of images.  When the user clicks on one of the eight grapples (or grippers or whatever they're called) and drags it with the intent of resizing the image, it does not work properly at all.  The grapple does not move correctly with the mouse, it is moving much less than it should.  Once completed, the <img> tag is left in an odd state:

<img width="15" height="11" style="width: 23px; height: 7px;" src=...

Notice the width and height don't match.  I suspect one of these factors might contribute:

  • OLECMDID_OPTICAL_ZOOM is changed.
  • I'm on a 4K monitor with DPI set to 250%

It seems like this is a bug/deficiency in MSHTML.


Greg Wittmeyer Gammadyne Corporation www.Gammadyne.com

How to open a file without saving it on Edge Chromium?

$
0
0
I just changed my browser to Edge Chromium and can't seem to just open files without having to save them. Before there was an option to open a file and after closing the page it will not be in the downloads folder. But now it automatically saves them on my computer without asking me whether I'd like to open or save them. Can you help me fix this?

Access Virtual Folder via React website but not directly

$
0
0

I have developed a website with React that has a page that displays, via IFrame, a .htm file found under the site in a Virtual Directory.  This works great, except... 

My website does require a login so I know the user has authenticated to the website (login is done by accessing a .NET web service API).  If they get to the page that has the IFrame on it, I know they have been authenticated for my website.  However, by inspecting the page, the user can see the URL of the Virtual Directory.  They can then navigate directly to that Virtual Directory in, for example, another tab and/or browser without having to sign in.  How can I prevent this?

If I disable Anonymous Authentication and enable Windows Authentication from the Virtual Directory, then when navigating through my website, the user is prompted for a network login.  This would be fine for direct access, but I want to by-pass this when accessed through my website as they've already signed in.

Any ideas on how I can accomplish this functionality?

Thanks.

Alternate API for TextRange.findText() API to use with Range object in IE11

$
0
0

We used to use TextRange.findText() API to find the text in the specified TextRange in the forward direction and passing in a parameter "-1" to the API i.e TextRange.findText(<some_text_to_find>, -1) we were able to find the Text in the reverse direction for IE<11 in our solutions.

Since TextRange has been deprecated in IE11, is there any other alternate API for TextRange.findText() that could be used with Range object that would provide the same functionalities as TextRange.findText()

How to forward search and reverse search for a character in a HTML document using Range API in IE11/Edge

$
0
0

We have a two column HTML layout. I want to implement forward search and backward search for a particular character in HTML using the Range API say "$" character in IE11

Earlier in IE10 we used to use TextRange API of IE to do it, the way we used to handle it was, if we have cursor position in first "$" character, we used to create two ranges range1, range2. range1 would be current selection range and range2 would be on entire document. Then we would use setEndPointAPI to TextRange to set start of range2 same as range1 and end of range1 same as range2. This enables us to find the text in forward direction using the TextRange's findText API, and once the character is found I have to select that character and vice versa for reverse search.

Now that Textrange has been deprecated starting from IE11, I tried to use the same using Range but since the APIs are not readily available as in TextRange API, is there any other way to mimic the same functionality?

corresponding HTML source:

<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width, initial-scale=1"><style>
* {
  box-sizing: border-box;
}

/* Create two equal columns that floats next to each other */
.column {
  float: left;
  width: 50%;
  padding: 10px;
  height: 300px; /* Should be removed. Only for demonstration */
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}</style></head><body><table width="100%"><tr><td><div class="column" style="background-color:#aaa;"><div><span style="font-weight: bold; text-decoration: underline;">Test 1</span><p>Some te$xt..</p></div><div><span style="font-weight: bold; text-decoration: underline;">Test 2</span><p>Some te$xt..</p><div></div></td><td><div class="column" style="background-color:#aaa;"><div><span style="font-weight: bold; text-decoration: underline;">Test 3</span><p>Some t$ext..</p></div><div><span style="font-weight: bold; text-decoration: underline;">Test 4</span><p>Some t$ext..</p><div></div></td></tr></table></body></html>


web application force Enable right click > open in a new tab/window on menu actions

$
0
0

Hi, 

I have a web application in spring boot, i was wondering if its possible to open a new tab of my application using Windows menu (Enable right click > open in a new tab/window on menu actions) trough my Javascript files  (IE11)

Any advice would be helpful, 

Thank you very much

Pilar

Hit Counter

$
0
0
Hello, Good night.

Friends, what is the html code, to put on the site, to make a visit counter?

Best regards

Vitor Patricio


How to open customized IE browser with .NetStandard

$
0
0

We need to be able to open a web browser from within our application (.NetStandard 2.0). The browser should be opened as an external application, the requirement does not call for the browser to be embedded in our application, thus using the WebBroswer control is not an option. We need to be able to specify the following options:

  • Height of the browser
  • Width of the browser
  • Top position
  • Left position
  • Addressbar enabled or disabled
  • Menubar enabled or disabled
  • Statusbar enabled or disabled
  • Toolbar enabled or disabled

We initially thought that using the Process class would work, but it doesn't seem that these options can be specified with the Process class. 

How can I start Edge in Private Mode with Selenium in Java?

$
0
0

I would like to start Edge in Private Mode with Selenium in Java, I would like to know which capabilities do I need to set.

Thanks.

How can i start Private Mode and Headless mode for Edge Chromium in Selenium Java?

$
0
0
How can i start Private Mode and Headless mode for  Edge Chromium in Selenium Java?

Is there a way to automate Applet which loaded in IE

$
0
0
Is there any way to automate java applet application using C# .net?

postMessage doesn't work in recent IE 11 browsers

$
0
0

Hi, I have some problems in my project.

  • parent window : a.a.com

  • popup window: b.a.com

When I execute window.opener.postMessage(~~, *) in popup window, parent window can receive event depending on IE versions. (works in all Chrome versions)

version: 11.1.18362.0 / update version: 11.0.110 - works

version: 11.557.17763.0 / update version: 11.0.130 - works

version: 11.1158.17763.0 / update version: 11.0.185 - works

version: 11.1304.17134.0 / update version: 11.0.175 - doesnt work

version: 11.1425.17134.0 / update version: 11.0.185 - doesnt work

version: 11.1868.16299.0 / update version: 11.0.190 - doesnt work

I cant find any issues about it. Are there some changes associated with postMessage or CORS policy?

Thanks.


disable internet browsing on server

$
0
0

If it is possible to completely disconnect all browsing capability to the internet from within a domain, yet maintain a browser for access to an application, it would be a step forward for a project I'm working with.

If the lexplore.exe properties, (iexplore.exe is located in both Program Files and and Program Files (x86)) can be set to be banned from accessing any IP address other than the one associated with the application (https://myapp), it is a start.

Additionally, and probably not the right place for the question, it would be great to do the same for Google Chrome.   There is information on how to disable guest use of Chrome, there doesn't appear to be much on how to disable it altogether.

REG ADD HKLM\SOFTWARE\Policies\Google\Chrome /v BrowserGuestModeEnabled /t REG_DWORD /d 0

CSS Position: Sticky; to keep a row /column of a HTML table frozen on a webpage when scrolling.

$
0
0

The below CSS property:value pair work for other browsers to keep a row /column of a HTML table frozen on the web page. But this does not work on IE. Is there an alternative way to do this on IE?

  1. position:-webkit-sticky;
  2. position:-moz-sticky;
  3. position:-ms-sticky;
  4. position:-o-sticky;
  5. position: sticky;

GWT application with google maps is giving a blank screen on IE 11.

$
0
0
GWT application with google maps is giving a blank screen on IE 11. , but working fine on Edge and also IE instances from Safari.  Can anyone support me in understanding what maybe the issue? 

Edge Chromium Blocking Access to Website (Secure)

$
0
0

I've installed Microsoft Edge Chromium now, when I attempt to go to a secure website, instead of being prompted for credentials, I 401 Error, access denied for user.

I am using SSO and attempted to add a admin account to Chromium however it takes me to the Microsoft login page of which, my admin account does not have an account.

How do you add credentials or at least, be prompted for credentials?

I never liked Google Chrome, I've never had any problem using any application with IE or Edge, I think the millions of whiners out there that don't know how to properly use Microsoft products and insisted on Google Chrome as the "superior" browser are full of it.

Is the a method to rollback to Edge where everything was working properly?

Microsoft Edge

$
0
0
Is there anyway that I can delete/uninstall microsoft edge & install windows explorer. I am so fed up with windows 10 in itself. Another microsoft product that isn't worth a crap!




Latest Images