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
Track downloads' status
Hello,I need to make somehow, some system, to track whether downloads are completed or failed. I tried to make this via php.Tried to limit the connection speed for smaller downloads (to have the time
error help - Dynamic Image
I've been working on making my site less cluttered in the directories and more secure lately. In an attempt to prevent bandwidth theft from other people using images, I decided to switch all my site
Hit counter updating once per IP - IP HIT COUNTER
I have a hit counter, for the amount of views on a tutorial.It'll do the query and then do..$views = $row['views'] + 1;Then insert $views into the database.This updates the view for each refresh of
CE 7.1 and External GIS integration
Hi All,
Displaying a record from mysql in a simple swf file
Hi,I have a mysql database containing information I would like to display in my swf. Using php can anyone explain how I might do this?I just need to understand the basics so I can develop it
RSS feed - FeedList for WordPress
Hi,I'm trying to alter the FeedList plugin for WordPress so that I can click on the title of an item and have it open in a new window to display the full item. I don't want it to go to the host
Alterar a hora do servidor
Se alguém souber, ajude-me a adicionar 6 horas, obrigado<tr> <th>{ov_server_time}</th> <th
onClick='location.href=index.htm'> not working
Below is my code:echo "<input type='button' value='redirect' onClick='location.href=index.htm'>";what is wrong with the code?? it's not working
Revoking alter any table from a schema
Hi All,
why isn't this PHP code working ???
it's suppose to find a name on the database. <?php $s = $_POST["lname"]; $x = trim($s); $exists = false; $selectedRow = 0; mysql_connect (localhost,testuser,testuser);