68 739
Assignments Done
Successfully Done
In January 2019

Answer to Question #5780 in Java | JSP | JSF for Johanni Thunstrom

Question #5780
Every time I try to open my javascript file i get this error on Line: 1 Char: 1 Error: 'window' is undefined Code: 800A1391 Source: Microsoft JScript runtime error

My code is a simple html file, a javascript js file, and a json file. The html and json file opens up but the javascript does not. also the javascript is supposed to make the info in the json file appear on the html page but it does not

this is the javascript

window.onload = function() {
var url = "file:///C:/wamp/www/gumball/sales.json";
var request = new XMLHttpRequest();
request.open("GET", url);
request.onload = function() {
if (request.status == 200) {
function updateSales(responseText) {
var salesDiv = document.getElementById("sales");
salesDiv.innerHTML = responseText;
Expert's answer

Not answered

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions