I have some text data (say var a = \'Hello World From Javascript\';)in javascript variable in current window. I want to do the following through javascript-
var a = \'Hello World From Javascript\';
If you already have the file on the server (I make an ajax call to generate and save a PDF on the server) - you can do this
window.location.replace(fileUrl);