1

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);
       }
   });
}
Mehul Tandale
  • 331
  • 1
  • 5
  • 17
Giorgos
  • 637
  • 3
  • 13
  • 25
  • have a look here for some brain food... http://stackoverflow.com/questions/3951768/window-open-and-pass-parameters-by-post-method – andy mccullough Nov 19 '15 at 08:25
  • andy mccullough the url report created in soloreport.jsp and may be have a different number of parameters – Giorgos Nov 19 '15 at 08:45

1 Answers1

0

Do

window.open(json.url,'PDF','directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no');

But this depends on the browser how it handles this.

void
  • 36,090
  • 8
  • 62
  • 107