0
私は印刷ボタンをクリックすると、別のページを呼び出すために次の関数を書いています。しかし、私が印刷ボタンをクリックすると、私は呼び出したいものの代わりに現在のページを開きます。をクリックして別のページを開く方法を教えてください。
function printme(tripId, requestId, Ecommerce) {
//alert("print is called");
alert(tripId);
alert(requestId);
alert(Ecommerce);
window.location.href = "ViewTripConformationPrint.cshtml?";
window.print();
//workaround for Chrome bug - https://code.google.com/p/chromium/issues/detail?id=141633
if (window.stop) {
location.reload(); //triggering unload (e.g. reloading the page) makes the print dialog appear
window.stop(); //immediately stop reloading
}
return false;
}
[window.location.hrefを変更した後にonloadコールバックを持つ方法はありますか?](http://stackoverflow.com/questions/13811582/is-there-a-way-to-have-変更後ウィンドウ・ロケーション-href) –