Didn't get answer with google and in my regular forum. Came across this site and posting here. Your help will be highly appreciated !
Our application have frames - MainNav, TaskNave and Content. When print button is clicked, it prints only the Content (obviously top.Content.focus() is in the code before window.print()). We were using windows 2000 & IE6 for years. Recently, our installation updated users machines with XP SP2. Now when print button is clicked, all three frames get printed in 3 pages. Same application, if used from XP SP2, 3 pages gets printed where as when used from W2K, only 1 page is printed. I looked all over place, didn't find any information on focus not working correctly with XP SP2. I tried so many things but no luck. Please help!
MainNav.jsp
--
<TD><A tabIndex=-1 href=#><IMG SRC="<%= imagePath %>/images/button_print.gif" ALT="Print" onClick="if (window.print) { top.Content.focus(); window.print(); }" border="0"></A></TD>
--
frameset.jsp
--
<FRAMESET ROWS="134,*" border="0" onload="resetTimer();" onunload="exitAlertWindow();">
<FRAME ONREADYSTATECHANGE="hidepane();" NAME="MainNav" SRC="<%= commandPath %>/CSES/Main/displayMainNav" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="no" FRAMEBORDER="0" NORESIZE TABINDEX="-1">
<FRAMESET COLS="180,588,*" border="0">
<FRAME ONREADYSTATECHANGE="hidepane();" NAME="TaskNav" SRC="<%= commandPath %>/CSES/Main/displayTaskNav" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="auto" class=TA FRAMEBORDER="0" NORESIZE TABINDEX="-1">
<FRAME ONREADYSTATECHANGE="hidepane();" NAME="Content" SRC="<%= commandPath %>/CSES/Main/displayWelcome<%= strMiscMessage %>" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="auto" FRAMEBORDER="0" NORESIZE>
<FRAME ONREADYSTATECHANGE="hidepane();" NAME="Blank" SRC="<%= imagePath %>/common/blankPage.html" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="no" FRAMEBORDER="0" NORESIZE>
</FRAMESET>
Now what I found:
On onclick for print, when I change top.Content.focus(); to top.MainNav.focus() it does print only MainNav; if I change to top.TaskNav.focus() it prints only TaskNav, but when I change to top.Blank.focus(), this prints multiple pages just like top.Content.focus().
So what I know is focus() does work on other 2 frames, but not on Content and Blank with XP SP2. With W2K IE6, everything works fine.
Tried changing the name of Content to something else, still didn't work. The site is intranet.
Any one has any idea what might be the reason that this code broke in XP SP2. Thanks.
8 4040
What is the status of the "Blank" frame when it is being printed? If its visiblity or other CSS attributes are set to make it not visible then this could be why it is printing the entire frameset instead of just that frame. i.e. IE might be trying to print that page, but when it goes there and sees there is nothing to print it assumes you must want to print the frameset content since there would be no point in trying to print a blank page.
Ok, blank is visible. The problem happens in both, Content and Blank. For both entire frameset is printed.
I tried few more things, and might be close - but still not there. Need your help.
1) I started playing with the frame order on frameset. Now when I put Blank at the left most, then TaskNav and then Content - and try focus on each of them on by one for printing - Now Blank printed correctly, TaskNav printed correctly but for Content every frames printed.
2) Changed order again, Now Blank, Content and TaskNav - This time all 3 printed correctly.
--> The conclusion I drawn is what ever frame is put after TaskNav, it cannot focus and print just that frame.
So something to do with TaskNav.jsp.
--> TaskNav.jsp is a long jsp with all the left menu items with their links. I made it a blank jsp with hardly anything in it. Now everything works fine, even the frames after the TaskNav.
Now I started putting the code in TaskNav.jsp one section of menu at a time, and test the print. I saw that after few sections, at one point it stops working. No matter what code I put. Is this has anything to do with the length of jsp??
Again the same code works fine with SP1 but XP/SP2 seems to have problem. Can you suggest anything I can try?
Thanks a lot.
Didn't get answer with google and in my regular forum. Came across this site and posting here. Your help will be highly appreciated !
Our application have frames - MainNav, TaskNave and Content. When print button is clicked, it prints only the Content (obviously top.Content.focus() is in the code before window.print()). We were using windows 2000 & IE6 for years. Recently, our installation updated users machines with XP SP2. Now when print button is clicked, all three frames get printed in 3 pages. Same application, if used from XP SP2, 3 pages gets printed where as when used from W2K, only 1 page is printed. I looked all over place, didn't find any information on focus not working correctly with XP SP2. I tried so many things but no luck. Please help!
MainNav.jsp
--
<TD><A tabIndex=-1 href=#><IMG SRC="<%= imagePath %>/images/button_print.gif" ALT="Print" onClick="if (window.print) { top.Content.focus(); window.print(); }" border="0"></A></TD>
--
frameset.jsp
--
<FRAMESET ROWS="134,*" border="0" onload="resetTimer();" onunload="exitAlertWindow();">
<FRAME ONREADYSTATECHANGE="hidepane();" NAME="MainNav" SRC="<%= commandPath %>/CSES/Main/displayMainNav" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="no" FRAMEBORDER="0" NORESIZE TABINDEX="-1">
<FRAMESET COLS="180,588,*" border="0">
<FRAME ONREADYSTATECHANGE="hidepane();" NAME="TaskNav" SRC="<%= commandPath %>/CSES/Main/displayTaskNav" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="auto" class=TA FRAMEBORDER="0" NORESIZE TABINDEX="-1">
<FRAME ONREADYSTATECHANGE="hidepane();" NAME="Content" SRC="<%= commandPath %>/CSES/Main/displayWelcome<%= strMiscMessage %>" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="auto" FRAMEBORDER="0" NORESIZE>
<FRAME ONREADYSTATECHANGE="hidepane();" NAME="Blank" SRC="<%= imagePath %>/common/blankPage.html" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="no" FRAMEBORDER="0" NORESIZE>
</FRAMESET>
Now what I found:
On onclick for print, when I change top.Content.focus(); to top.MainNav.focus() it does print only MainNav; if I change to top.TaskNav.focus() it prints only TaskNav, but when I change to top.Blank.focus(), this prints multiple pages just like top.Content.focus().
So what I know is focus() does work on other 2 frames, but not on Content and Blank with XP SP2. With W2K IE6, everything works fine.
Tried changing the name of Content to something else, still didn't work. The site is intranet.
Any one has any idea what might be the reason that this code broke in XP SP2. Thanks.
Ok then try this:
window.frames["content"].print();
Ok then try this:
window.frames["content"].print();
sorry I rectify myself:
top.frames["content"].print();
Sorry, didn't work ! Any other idea ?
sorry I rectify myself:
top.frames["content"].print();
Any one ? Seems like its the lenght of jps (TaskNav.jsp). If I take out some code out of TaskNav.jsp, the print of Content works. Kind of wierd. I don't see any errors on the code of TaskNav. Just menus coded in jsp tags.
Any one know any relation of length of jsp (means, long code in jsp) with the focus/print or frame problem ?
Hi,
I also have got the same problem with our intranet-application after we installed XP/SP2 :-(
I try to print a frame with a PDF. With SP1 this worked fine (set focus on the corresponding frame and then print () ). with SP2 I only get an empty page with the printed link to the file on the server. :-(
Does anybody find a solution for this problem?
Good to know that its just not me...
One more thing I like to add, forget my print button. If I right click the frame I want to print (Content) and do print, it still prints all 3 frames....
Any one ?
Hi,
I also have got the same problem with our intranet-application after we installed XP/SP2 :-(
I try to print a frame with a PDF. With SP1 this worked fine (set focus on the corresponding frame and then print () ). with SP2 I only get an empty page with the printed link to the file on the server. :-(
Does anybody find a solution for this problem?
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Fred Snider |
last post by:
Help!
Opening a new window using the window.open( ) command works great
for opening new windows and having them on top and having the focus.
The window.focus command brings any existing...
|
by: CES |
last post by:
All,
I'm trying to test if a browser is configured so that I can use popup
windows or if it has a popup blocker installed... the only solution I was
able to think of, was one that would pop up a...
|
by: Wei |
last post by:
I need the current window stay on focus. The user will have to click on exit
button to exit the window. How can I do this in asp.net in C#?
Thank you
|
by: Csaba Gabor |
last post by:
Up until a few weeks ago, javascript code like
window.open("http://mydomain.com", "windowName");
would always bring my new or reused window to the top, with focus.
Lately, Firefox (Deer park...
|
by: Peter TB Brett |
last post by:
Hi folks,
I'm currently trying to work out how to detect when a PyGTK window
receives the focus from the window manager -- I assume that it must
receive some kind of X event, but I can't work...
|
by: Roger |
last post by:
Hi,
I am confused about the differences between this.window.focus(),
window.focus(), and this.focus().
I want to use the calls in a <body onload="..."tag. What are the
differences between...
|
by: Jason |
last post by:
Hi,
Here's the scenario:
I have a web application that has window A and window B.
A user has both window A and B open - window A is in the foreground and
window B is behind it.
If the...
|
by: acehigh1983 |
last post by:
Is it possible to focus a window in firefox and safari??
i have a webpage that opens another window, it then focuses on the original window (the new window that opened now behind it in the...
|
by: Spizzat2 |
last post by:
I'm trying to figure out a workaround to a minor annoyance that I'm
coming up with while coding a site. I've got some keyboard shortcuts
set up for the site via javascript, and when I press escape,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |