I have the following ajax js code. The ../menu/solonreport.jsp return a url link like this connect to a local report server and create a excel report.
The window.open(json.url)
open the link in new window but I dont want to show the link and more the parameters to the user.
Is this possible?
function getEventTarget(e) {
e = e || window.event;
return e.target || e.srcElement;
}
var ul = document.getElementById('menureport');
ul.onclick = function(event) {
var target = getEventTarget(event);
var reportid = target.id;
var reporttype = target.innerHTML;
alert(reportid);
$.ajax({
type: 'GET',
url: '../menu/solonreport.jsp',
data: {
Wreportid: reportid,
Wreporttype: reporttype
},
async: false,
dataType: 'json',
success: function(json) {
window.open(json.url);
}
});
}