Chrome, Firefox does not load HTML Table, But Safari loads HTML Table successfully

543 views
Skip to first unread message

Gollum

unread,
Aug 21, 2016, 1:33:10 AM8/21/16
to Chromium-discuss
I wrote a Html page with javascript to parse xml file of test results into tables of data. Tables are created dynamically by package name and load test results of package.
I am able to successfully open my results html page in Safari on Mac, but Chrome and Firefox show only links on page but HTML table totally invisible. No table, no data toatlly black white page with only links showing name of those tables.
 What went wrong? Suggest. Below is .css file:

body {

margin: 0 auto;

padding: 0;

text-align: left;

height: 100%;

font-family: myriad, arial, tahoma, verdana, sans-serif;

color: #151515;

font-size: 90%;

line-height: 1.3em;

background-color: #FFFFFF;

}


tr:nth-child(even) {

    background-color: #FFF0F5;

}


* {

margin: 0;

padding: 0

}


.clr {

clear: both;

overflow: hidden;

}


a:hover {

text-decoration: none;

}


a:focus, a:active {

outline: none

}


.noborder {

border: none

}


div {

background-color: #c1d4cc;

}


#blueBack {

background-color: #FAF0E6

}


html, body {

    width: 90%;

}

table, th, td  {

    margin: 35 !important;

    border-collapse: collapse;

    border: 1px solid black;

    border-spacing: 150px 150px;

    table-layout: fixed;

}


th, td {

padding: 5px;

}

PhistucK

unread,
Aug 21, 2016, 4:38:16 AM8/21/16
to ses...@gmail.com, Chromium-discuss
Can you share a URL that reproduces the issue? Just sharing the CSS is not enough to investigate.


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Gollum

unread,
Aug 21, 2016, 11:38:45 AM8/21/16
to Chromium-discuss
Hi Phistuck,

  This is the url I am trying to access. It works perfectly fine in Safari. But in Chrome and Firefox, I can see only the links and static text. But tables with actual test results data expected to load dynamically is not loading. a blank white space. Suggest.


file:///Users/associate/Documents/EclipseWSMay2016/develop/loan_service/src/test/resources/itsummary/LoanITResults.html

Thanks

PhistucK

unread,
Aug 21, 2016, 11:44:24 AM8/21/16
to sesha v venkat, Chromium-discuss
Oh, file URLs... The horror. If you start up a simple static server, does it work?
file:// URLs have certain restrictions (cannot access data from other directories and so on...). Browsers disagree about those restrictions.

(When I asked for a URL, I meant a URL on the web, so I could access it and see if I can reproduce or diagnose)

Do you see any console error?


PhistucK

--

Gollum

unread,
Aug 21, 2016, 11:53:12 AM8/21/16
to Chromium-discuss
I use TestNg to generate test results. I need a customized report. I parse the generated TestNg suite xml file and generate test report. That is the requirement. When I ask some non-technical guy to go thru this report, i do not expect a server to run. I could open TestNg report from test-output folder index.html in all browsers. 

file:///Users/associate/Documents/EclipseWSMay2016/develop/loan_service/target/integration-test-results/html/index.html  

Then why I can not open customized report? What is the cause I am unable to follow.


On Sunday, August 21, 2016 at 1:33:10 AM UTC-4, Gollum wrote:

PhistucK

unread,
Aug 21, 2016, 11:59:09 AM8/21/16
to sesha v venkat, Chromium-discuss
Sorry, I do not know those tools at all, so those names and folder names are meaningless for me.

I asked that you try it with a web server in order to verify that file:// URLs are the cause.

I guess you are not a web developer? Well, when you try to open the problematic page in Chrome, press F12 and go to the Console. Do you see anything there? If so, copy everything (filter private stuff, if you are worried) you see there and paste it in your reply.


PhistucK

--

Gollum

unread,
Aug 21, 2016, 12:21:47 PM8/21/16
to Chromium-discuss
Please find below the details from Chrome console:


Warning: Loan_it_results.js:14  Synchronous XMLHttpRequest on the main thread is
deprecated because of its detrimental effects to the end user's
experience. For more help, check http://xhr.spec.whatwg.org/.

Error: Loan_it_results.js:16 XMLHttpRequest cannot load
file:///Users/associate/Documents/EclipseWSMay2016/ITTestFixesGollum%20/
loan-service/target/integration-test-results/TEST-TestSuite.xml. Cross
origin requests are only supported for protocol schemes: http, data,
chrome, chrome-extension, https, chrome-extension-resource.getITResults
@ loan_it_results3.js:16 loan_it_results3.js:16 

Error: Uncaught NetworkError:
Failed to execute 'send' on 'XMLHttpRequest': Failed to load
'file:///Users/associate/Documents/EclipseWSMay2016/ITTestFixesGollum%20/
loan-service/target/integration-test-results/TEST-TestSuite.xml'.


On Sunday, August 21, 2016 at 1:33:10 AM UTC-4, Gollum wrote:

PhistucK

unread,
Aug 21, 2016, 12:26:43 PM8/21/16
to sesha v venkat, Chromium-discuss
Yes, it seems to be the file:// URL same-directory restriction. You will either have to place everything you load in the same folder, or use a web server (preferred). You can create a public web server and just give its URL to people, instead of sending them all of the files.


PhistucK

--

Gollum

unread,
Aug 21, 2016, 12:31:22 PM8/21/16
to Chromium-discuss
Thanks Phistuck for clarifying.


On Sunday, August 21, 2016 at 1:33:10 AM UTC-4, Gollum wrote:
Reply all
Reply to author
Forward
0 new messages