Not sure what forum so let me know if I'm in the wrong place.
I have a main window with a ajax grid that has a column of links that uses javascript and window.location to go to another page to show check stub information. When I use the backbutton on the browser everything persists on main window. Ok so far.
If I navigate to the window with the show check stub information, there is a 'Print' button that again thru javascripts prints the grid with the check info on it. (Code I got of the internet with some minor changes I made).view plaincopy to clipboardprint?function Print() { var curVisible = true; var grid_obj = document.getElementById('<%= grdVoucherDetail.ClientID %>'); for (var i = 1; i < grid_obj.rows.length-1; i++) { grid_obj.rows[i].cells[8].style.display = curVisible ? "none" : "inline"; grid_obj.rows[i].cells[9].style.display = curVisible ? "none" : "inline"; } if (grid_obj != null) { var new_window = window.open('print.html'); //print.html is just a dummy page with no content in it. new_window.document.write(grid_obj.outerHTML); new_window.document.close(); new_window.focus(); new_window.print(); new_window.close(); } curVisible = false; for (var i = 1; i < grid_obj.rows.length-1; i++) { grid_obj.rows[i].cells[8].style.display = curVisible ? "none" : "inline"; grid_obj.rows[i].cells[9].style.display = curVisible ? "none" : "inline"; } } function Print() {
var curVisible = true;
var grid_obj = document.getElementById('<%= grdVoucherDetail.ClientID %>');
for (var i = 1; i < grid_obj.rows.length-1; i++) {
grid_obj.rows[i].cells[8].style.display = curVisible ? "none" : "inline";
grid_obj.rows[i].cells[9].style.display = curVisible ? "none" : "inline";
}
if (grid_obj != null)
{
var new_window = window.open('print.html'); //print.html is just a dummy page with no content in it.
new_window.document.write(grid_obj.outerHTML);
new_window.document.close();
new_window.focus();
new_window.print();
new_window.close();
}
curVisible = false;
for (var i = 1; i < grid_obj.rows.length-1; i++) {
grid_obj.rows[i].cells[8].style.display = curVisible ? "none" : "inline";
grid_obj.rows[i].cells[9].style.display = curVisible ? "none" : "inline";
}
}
Now after the print and closing that popup I click the backbutton again and things don't seem to persist.
I did notice that the pageload of the main window (one I'm going back to) gets triggered after the printing of the grid where if I don't click the print button and go back the pageload does not get triggered.
Any ideas would be appreciated. I have searched and searched for an answer and am getting nowhere. When this happens I usually feel that I've done something stupid. Oh well
Thanks for any help that you can give me
How to get variable value on next page
Hello friends i am working on payentry page ..there i have this code......... Code: $str="select MAX(PSRN) from paymajor";$result=mysql_query($str) or
mail() says sent but no email received
My code is quite simple:Code: <?php$to = "Ty44ler@yahoo.com";$subject = "Test mail";$message = "Hey, I just wanted to see if the script worked.";$from =
PHP & Java
Hello,can PHP code be used inside java code?Code: <SCRIPT LANGUAGE="JavaScript">OpenWindow.document.write("<?php echo NotWorking;
Php script to read msword file
hi,I need to read a msword file and i want to print the contents in that word file.i used the fgets() and its working for text file. but its not working for word file.Help me in this.Thanks
BB_Code error
I'm having a problem with a custom built function and keep getting this error:Warning: Missing argument 1 for BB_Code::BB_Code(), called in /home/cra10002/public_html/mooglebook/input.php on line 21
File upload issues
Hi Guys,Can anyone see any issues with this code:Code: [Select]$setImage= 'productimages/' . date(U) . $HTTP_POST_FILES['setImage']['name'][0];copy($HTTP_POST_FILES['setImage']['tmp_name'][0],
Dump with added_funcion cl_salv_table
Hi there, I'm having some troubles adding a self defined function to an ALV in fullscreen. The thing is that I'm getting a dump after I press de button of my added function; the exception is
mail with attachment problems
Hi. I have the following code:Code: else if(file_exists("site".$timp.".zip")) {$file=fopen("site".$timp.".zip", "rb"); $data=fread($file,
How to implement HTTP connection timeout
Hi All,I would like to implement an HTTP connection timeout.I am working on a application which uses HTTP connection, but the problem here is that the response from server is late... I want to create
import table with dependency
Hi