i have an external hdd and it has self installed software that comes with a website.
when i click on the site launcher it gives a js error.

function loadResourceFile(file) { var req = window.XMLHttpRequest ? new XMLHttpRequest() : (window.ActiveXObject ? ActiveXObject("Microsoft.XMLHTTP") : null ); if(req!=null) { req.open("GET",file,true); req.send(null); } }

the harddrive is a hitachi lifestudio harddrive. anyone know why it isnt working properly?

Recommended Answers

All 2 Replies

JavaScript is not JSP (Java Server Pages).

Moved to JavaScript section...

EthHunt,

The script is attempting to do some AJAX (Google it if you don't already know what AJAX is) to get a data file from somewhere (probably a remote server).

Reading betweeen the lines (I'm guessing), the site is provided on a disk and the script was tested several years ago on IE5/6, which allowed cross domain AJAX. Earlier and later versions of IE and (IIRC) all other browsers won't play ball with cross-domain AJAX (I've been there recently).

If I'm right, then possible solutions are :

  • Launch the provided website in IE5/6.
  • Visit the Hitachi site and see if they have an online version (typically in the Product Support section or similar).
  • Make a copy of the site and edit loadResourceFile() to include a call to Flensed's flXHR object as an alternative to XMLHttpRequest() / ActiveXObject("Microsoft.XMLHTTP"). I can personally vouchsafe that flXHR is an excellent near-universal workaround for cross-domain AJAX - well the best I have found to date (the Flensed site gives full instructions). If anyone knows better, please do tell.

Of course, there may another explanation. Anyone?

Airshow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.