Hi!
I have an AJAX function that send’s a string by the post method and display the result in the same page:
[CODE=javascript]
xmlHttp.onready statechange = stateChanged;
xmlHttp.open('P OST', url, true);
xmlHttp.setRequ estHeader("Cont ent-type", "applicatio n/x-www-form-urlencoded");
xmlHttp.setRequ estHeader("Cont ent-length", parameters.leng th);
xmlHttp.setRequ estHeader("Conn ection", "close");
xmlHttp.send(pa rameters);
//.....
document.getEle mentById(id).in nerHTML=xmlHttp .responseText;[/CODE]
But now I want another function that send’s the same string to the server (PHP), and the result is an Excel file, that it should display the download dialog.
Any ideas?
Thx in advance
I have an AJAX function that send’s a string by the post method and display the result in the same page:
[CODE=javascript]
xmlHttp.onready statechange = stateChanged;
xmlHttp.open('P OST', url, true);
xmlHttp.setRequ estHeader("Cont ent-type", "applicatio n/x-www-form-urlencoded");
xmlHttp.setRequ estHeader("Cont ent-length", parameters.leng th);
xmlHttp.setRequ estHeader("Conn ection", "close");
xmlHttp.send(pa rameters);
//.....
document.getEle mentById(id).in nerHTML=xmlHttp .responseText;[/CODE]
But now I want another function that send’s the same string to the server (PHP), and the result is an Excel file, that it should display the download dialog.
Any ideas?
Thx in advance
Comment