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
Displaying data from database into a 2 dimensional table
Good day!I'm a beginner in PHP and I'm not expecting a full coding for this qestion. I'm just looking for hints and pointers as to how to solve this problem so that I can learn it myself.I have a
Mail form doesn't send Russian/Cyrillic characters correctly?
When someone enters foreign characters (like Cyrillic text, and Japanese/Chinese probably gives the same problem) into the mail form, the email that arrives is all gibberish. For example this should
PHP If Else statement for breadcrumb
HiI am trying to use a PHP if else statement to display a breadcrumb link on wordpressThe codeLine number On/Off | Expand/Contract <div class="triple silhouette_break">
Character Set Setup
Whats the best character set to use if you want every character to work, and also how do you make your files, mysql stuff, and all that set for the best character type..... got a check list i can
need Array help
This is what I have to do. $teamname[1] = "Red Sox" $teamname[2] = "Giants" $teamname[3] = "White Sox" $teamname[4] = "Cubs" $teamname[5] =
Get to know your fellow coder
I think it's time we got personal around here. There's a lot of code swapping and a few members know a little more about the others, but the vast majority of us are nothing but coders passing in the
Using Microsoft Exchange Server with PHP
Hi,I wanted to know if its possible to fetch email attachments from the exchange server using php.I know its possible to read message using the source I found in an article here
str_replace help
I am thinking str_replace is my only option to filter outputs from my database to convert them to safe url variables.I am working with a database with over 4million records, and apparently when the
quick basic question, hopefully not dumb
I don't know how to search for this, so forgive me if it's been covered...I often see an example like this:$a = $b . " " . $c; // concatenate strings with spaceI'm wondering if there is
Weird MySQL error, why am I recieving this?
PHP Code:<?php require "global_settings.php"; ?><title><?php echo $sitetitle; ?></title><center><style