Open same webpage in new "print friendly window"
Is it possible to provide a print button on a dynamic webpage (jsp) which opens the same content (not reload and get new dynamic content) in a new window and also use a new style sheet which e.g. is more print friendly?
var win = window.open('', 'printme', 'width=500, height=600');
win.document.open();
win.document.writeln('<html>');
win.document.writeln('<head>');
win.document.writeln('<title>print me</title>');
win.document.writeln('<base href="' + document.location.href + '">');
win.document.writeln('<link rel="stylesheet" href="/css/printable.css">');
win.document.writeln('</head>');
win.document.writeln('<body>');
win.document.writeln(document.body.innerHTML);
win.document.writeln('</body>');
win.document.writeln('</html>');
Similar Messages
-
On occasion when I click links in Firefox nothing happens. The connection doesn't seem to be made, I can click repeatedly, and still it doesn't follow the link. Then when I open a new tab, or window, and paste the same link, it goes instantly. Someone mentioned that this may be a Firefox addon problem. Is there any solution to this non-connecting problem I seem to be having?
== This happened ==
Every time Firefox opened
== Has been occuring for agesLooking at your installed extensions, I would be guessing either the Free Download Manager plugin or Skype extension (last is unlikely as it's deactivated, but you never know..).
You can test if it's an add-on problem by starting Firefox in [[Safe Mode]] - if there is no longer an issue in Firefox Safe Mode, it is almost certain that one of the add-ons are at fault. -
same webpage cannot open in more than one ''tab.''
When you enter a site in the URL/Location/Address bar and see "Switch to tab" in the drop-down, you can use ALT+Enter to open the new (duplicate) tab anyway '''''OR'''''<br />
You can install this Add-on: https://addons.mozilla.org/en-US/firefox/addon/switch-to-tab-no-more/
'''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
Not related to your question, but...
You may need to update some plug-ins. Check your plug-ins and update as necessary:
*Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
*Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
*Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
*Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
*Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox] -
I need applescript open same URL in 15 different Safari Windows
Can someone please help me with a simple applescript that I need:
I need a script to open the same url in 15 different Safari windows at the same time. Thanks a lot.To open them in tabs in the current window, use:
set theURL to "http://discussions.apple.com/thread.jspa?threadID=2014917&tstart=0"
set theCount to 15
tell application "Safari"
tell front window
repeat with i from 1 to theCount
set theWin to make new tab at end
set URL of theWin to theURL
end repeat
end tell
end tell
Greetings, Marcus. -
Opening OA page in new java script window from ProcessRequest method
I wish to open new OA page in new java script window.
Code is
javascript:var help_win = window.open(strHelpDesk,'help_win',
'resizable=yes,scrollbars=yes,toolbar=yes,width=600,height=500'); help_win.focus();
strHelpDesk is the url of the requested new OA page .. How can we open that page in new window from processRequest .. I can't assign this code in pages's attribute ... The new Oa page should be opened whenever , control goes in Processrequest ... Do we have such command ? can we use pagecontext.redirectImmediately..or any other command ..
thx in advanceYes, you can, what you need to do is
add a raw text bean in your page.
Attach this raw text bean to a transient attribute (column) of VO
populate this column with your javascript function which will open a new window and inlcude its call here
now whenyour page will render and process request is called ur javascript function is triggered and a new window will be opened.I guess i am clear!
--Mukul -
Unable to open same form with Multiple logins on Windows IE8
Hello All,
We recently upgraded our instance from Jinitiator to Java Plugin Version 1.6 U18.
After that we are unable to open same form from different logins on a same windows machine.
the following is scenario.
1) Login as X user into EBS and open a sales order form. -- Every thing is fine.
2) On the same machine in another browser window, login as X user again and open Sales order form. --- No issue here also,
3) On the same machine in another browser window(Keeping the above forms open), login as Y user and open sales order form ---> Form opened from Y user is fine, but, both forms of X user are exiting Oracle applications with message" Your logon session become invalid. Exiting Oracle applications".
we have encountered issues with opening an attachment from a form, and it is resolved by Unchecking "Enable the next generation java plugin" option in Java control panal --> Advanced -> Java plugin. This workaround done according to note: 290807.1
But the multiple login issue is not resolved.
THis isssue is in our PROD and we are loosing customers. Please Advice ASAP.
THanks.
Rama Krishna N K JHi Rama;
It was working before? If yes what have you been changed on your system?(patch etc) You have same error on IE 7 or firefox? Did you check apache log file for more details? You have any FRM error code?
Please check those settings on your IE8:
1 - Go to Tools > Internet Options > Security > Select Sites > click on button "Sites": add the url of ebs.
2 - Go to Tools > Internet Options > Security > Select Sites > Custom Level > Disabled XSS filter.
Also check:
Recommended Browsers for Oracle E-Business Suite 11i [ID 285218.1]
Regard
Helios -
Opening safari makes a new grey desktop window
Everytime i open safari it makes a grey desktop window which cannot be interacted with, restarting does not fix this problem either.
This happened after using the app called "Iscreen" might be to do with that.Hold the shift key down and launch Safari.
-
How to open my Ireport in new browser tab window
hi
I'm using Jdev v 11.1.2.3.0
Isucced in conneting and calling (ireport) generated report from my adf application in pdf file format
All what I want to do now is to call or open the report in browser tab window
I can call it in the same tab window
using this line code
response.setHeader("Cache-Control", "max-age=0");
or
make attachment download
using this line code
response.setHeader("Content-Disposition", "attachment; filename=\"report.pdf\"");
please help me in this last setp
here is my code to call ireport
after adding nessesary jar files and Datasource in wedlojic
maybe it help others
============
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.sql.Connection;
import java.util.HashMap;
import java.util.Map;
import javax.faces.context.FacesContext;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.servlet.ServletContext;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.type.WhenNoDataTypeEnum;
import net.sf.jasperreports.engine.util.JRLoader;
import oracle.adf.model.BindingContext;
import oracle.adf.view.rich.component.rich.input.RichInputText;
import oracle.binding.BindingContainer;
//import oracle.adf.model.binding.DCIteratorBinding;
public class mainNew {
private RichInputText copyFrom;
private RichInputText copyTo;
public mainNew() {
public void setCopyFrom(RichInputText copyFrom) {
this.copyFrom = copyFrom;
public RichInputText getCopyFrom() {
return copyFrom;
public void setCopyTo(RichInputText copyTo) {
this.copyTo = copyTo;
public RichInputText getCopyTo() {
return copyTo;
public String cb3_action() {
String s =(String)copyFrom.getValue();
String d =(String)copyTo.getValue();
// copyTo.setValue(s);
// DCIteratorBinding empIter = (DCIteratorBinding) getBindings().get("Employees1Iterator");
// String empId = empIter.getCurrentRow().getAttribute("DepartmentId").toString();
Map m = new HashMap();
System.out.println(s) ;
System.out.println(d) ;
// m.put("eployeeId", copyFrom.getValue() );
if (s!=null) {
m.put("whr", "Where department_id ="+s); }
if (d!=null) {
m.put("whr", "Where employee_id= "+d);}
if (s != null & d==null)
{ m.put("whr", "Where department_id ="+s);
if (s==null & d!=null) {
m.put("whr", "Where employee_id= "+d);}
if (s!=null & d!=null) {
m.put("whr", "Where department_id ="+s +" and employee_id="+d);}
if (s==null & d==null) {
m.put("whr", "Where 1=2");}
try
// runReport("empRep2.jasper", m);
runReport("empsDyn.jasper", m);
catch (Exception e)
return null;
public BindingContainer getBindings()
return BindingContext.getCurrent().getCurrentBindingsEntry();
public Connection getDataSourceConnection(String dataSourceName)
throws Exception
Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup(dataSourceName);
return ds.getConnection();
private Connection getConnection() throws Exception
return getDataSourceConnection("hrDS");
public ServletContext getContext()
return (ServletContext)getFacesContext().getExternalContext().getContext();
public HttpServletResponse getResponse()
return (HttpServletResponse)getFacesContext().getExternalContext().getResponse();
public static FacesContext getFacesContext()
return FacesContext.getCurrentInstance();
public void runReport(String repPath, java.util.Map param) throws Exception
Connection conn = null;
try
HttpServletResponse response = getResponse();
ServletOutputStream out = response.getOutputStream();
/// response.setHeader("Cache-Control", "max-age=0"); // opens in same page
response.setHeader("Content-Disposition", "attachment; filename=\"report.pdf\""); // genreat adownload file
// response.setHeader("Content-Disposition", "inline; filename=\"" + "Report.pdf\"");//opens in same page
response.setContentType("application/pdf");
ServletContext context = getContext();
InputStream fs = context.getResourceAsStream("/reports/" + repPath);
JasperReport template = (JasperReport) JRLoader.loadObject(fs);
template.setWhenNoDataType(WhenNoDataTypeEnum.ALL_SECTIONS_NO_DETAIL);
conn = getConnection();
JasperPrint print = JasperFillManager.fillReport(template, param, conn);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
JasperExportManager.exportReportToPdfStream(print, baos);
out.write(baos.toByteArray());
out.flush();
out.close();
FacesContext.getCurrentInstance().responseComplete();
catch (Exception jex)
jex.printStackTrace();
finally
close(conn);
public void close(Connection con)
if (con != null)
try
con.close();
catch (Exception e)
}One solution would be to generate the report via an servlet which you then call with an af:golink with an target frame set to blank.
For a sample how to do this check out http://tompeez.wordpress.com/2011/12/16/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-3/
Timo -
I use google mail for work and personal mail. When using my Mac, I click on a document (PDF, Excel, etc) in an email message and it opens a preview of that document in a new tab.
On my Windows PC, I do the same thing and it just sits there. I have checked the pop-up blocker and some of the settings but can't figure out why it works in one and not in another.
Any help is appreciated.Check if this KB might be of any help:
https://support.mozilla.org/en-US/kb/tab-preferences-and-settings
Thanks!
Om Prakash -
Opening same URL in another tab or window
switcher here: in windows I could open a new window and the website that opened by default was the one that was already open (so now I have 2 windows with the same site)...Is there an equivilent Safari? How about Camino or firefox?
Right now i have been opening a new tab then copy and pasting the URL of the site I want duplicated....
Thanks for the helpYou can get that function in iCab: http://www.icab.de/
It's in iCab's contextual menu: Page > Open in New Tab & Page > Open in New Window. In addition, you can get the contextual menu in iCab just by holding down the mouse: this has to be set up in iCab Preferences >General > Contextual Menus.
I couldn't find this function in either Shiira or Camino.
eMac Combo 1GHz/1GB/60GB Mac OS X (10.4.7) CanoScan D646U, Canon iP1600, CrossFire 120GB, DSL, D-Link DI-624 -
Why does Safari open my last visited page?? I have gone into preferences and said to open to homepage when starting safaring or opening a new tab yet each time it opens to the last page I visited.
Hold down "shift" key and launch Safari
or hold down "option" key before quitting Safari to discard saved windows from previous session.
Disable Resume feature.
10.7 Lion
System Preferences > General
Uncheck the box next to "Restore windows when quitting and re-opening apps".
10.8 Mountain Lion
System Prefernces > General
Chckmark the box next to "Close windows when quitting an application". -
Firefox dosn't open,error 500,occure, new computer with windows 7.
I have tried to reinstall firefox few times first time 3 weeks ago, I use Widows 7 & mcafee, there was no problem with previous wersion
Make sure that you do not run Firefox in full screen mode (press F11 or Fn + F11 to toggle; Mac: command+Shift+F).
If the menu bar is hidden then press the F10 key or hold down the Alt key, that should make the menu bar appear.
Make sure that toolbars like the "Navigation Toolbar" and the "Bookmarks Toolbar" are visible: "View > Toolbars"
* If items are missing then open the Customize window via "View > Toolbars > Customize" or via "Firefox > Options > Toolbar Layout"
* If a missing item is in the toolbar palette then drag it back from the Customize window on the toolbar
* If you do not see an item on a toolbar and in the toolbar palette then click the "Restore Default Set" button to restore the default toolbar set up.
See also:
* http://kb.mozillazine.org/Toolbar_customization
* https://support.mozilla.com/kb/Back+and+forward+or+other+toolbar+items+are+missing -
Open OA Page in new Tab or new Window
Hi
I there a way that you can set a page to open up in a new tab or window instead of replacing the current page you are in?
thank youHi
thank you for your help
I found this solution
if I put the following vlue in the destination URI in the LOV the detail shows in a new window instead of replacing the current window
javascript:void window.open('OA.jsp?page=/forsythe/oracle/apps/forx/b2bquote/webui/B2BQuoteLinesPG"eId={@QuoteId}&retainAM=Y&addBreadCrumb=Y')
thank you -
Every link in Safari opens in new tab or window
I'd like to find a way so that every time I click a link in Safari, instead of opening in the current window, it opens in either a new tab or window.
I understand that I can hold down "Command" while I click a link and it will open in a new window or tab, and that I can right click or control click and select "open in new window" from the contextual menu, but I don't want to do that.
I simply want every link that I click to open in a new window. Every time.
I'm willing to dig deep into the system and get under the hood if necessary.
Thanks,
DarrylI'm not sure what you mean. Are you asking me to post my Safari preferences? Or something else?
Anyway, 10.6.6 running Safari 5.0.3.
Tab preferences - "Open pages inn tabs instead of windows" = "Always".
"Command-click opens link in a new tab" - checked
"When a new tab or window opens, make it active" - checked
"Confirm before closing multiple tabs or windows" - checked. -
Bookmark 'Open in new Tab' or 'Window' doesn't on this latest install
Right clicking on a bookmark, allows me to open link in a new tab or window.... this works for the first while, but then breaks down and doesn't open anything. Restarting FF 4.0 works to resolve this issue. But lately after a half hour of working properly.. I have to restart. Never had this issue with 3.6... this a new bug?
Right clicking on a bookmark, allows me to open link in a new tab or window.... this works for the first while, but then breaks down and doesn't open anything. Restarting FF 4.0 works to resolve this issue. But lately after a half hour of working properly.. I have to restart. Never had this issue with 3.6... this a new bug?
Maybe you are looking for
-
How can I make CONTAINS query work for a date range
In either 9i or 10g (eventual). I have a CONTEXT index that contains multiple columns from multiple tables and using a USER_DATASTORE. E.g., I have names that come from 3 different table locations and dates that come from 4. I can index them fine but
-
Iphone videos on PC - no video
Any videos taken on my Iphone, when played on my PC in Quicktime - only play audio with a black screen. Nero wont even recognize the files so I cant even attempt to make a dvd out of them. So other than watching the videos on my Iphone, I can do abso
-
Is it possible to have an applet act as a server?
Is there a way to make an applet listen on a specific port and act accordingly when contacted?
-
Iphoto making the photo sizes to Zero.
I've a photo library on an external harddrive (WD digital Passport drive) which is always connected to my MacPro laptop. I've been storing photos on this since 2008. When I launch iPhoto, it automatically opens the library on the external drive. Late
-
HI there, trying to use GarageBand with Yamaha DSG-650 Midi interface but not working
Hi There Can anyone help with connecting a MIDI (USB) to the MAC? It doesn't recognize the keyboard Thanks