How to open pdf document in other window by using java script
Hello All,
I am working in R12 Application.
My jdeveloper version is 10.1.3.3.0.3
I want to open pdf document in other window on clicking the button
for that i have written following code in process request of the controller:
pageContext.putJavaScriptFunction("doFilterSwitch", "function doFilterSwitch(){window.open('/t01/oracle/TEST/inst/apps/TEST_appsdev2/logs/appl/conc/out/545042.pdf'); }");
OAButtonBean moHelp =(OAButtonBean)webBean.findChildRecursive("Download");
moHelp.setOnClick("doFilterSwitch()");
but when i hit download button it gives me the below error:
The webpage cannot be found
HTTP 404
Most likely causes:
There might be a typing error in the address.
If you clicked on a link, it may be out of date.
What you can try:
Retype the address.
Go back to the previous page.
Go to and look for the information you want.
More information
please help me out
Regards,
sheetal
Instead of giving the link in Process form request, give the link directly in Destination URI property of the button and in target property write _blank.
Note : use normal button not submit button
Similar Messages
-
Opening PDF Document in New Window
Hi,
I have requirement to open pdf document in new window. I'm using Travel Expense form. I'm using the FM PTRM_WEB_FORM_PDF_GET. When I give 'X' to i_display_form, it displays the pdf document in same session or window. But I would like to open the pdf file in new window.
The FM gives me pdf data of type RAWSTRING. Is there any FM or class where I can pass this data and open it in New Window.
Can anyone please suggest on this.
Regards,
JMBdownload it using gui_download and use cl_gui_frontend_services=>execute to execute that pdf file
-
Hi ,
I am trying to build a dynamic calculator in WAD which is as similar to one in Executive view in Cognos. The problem i am facing is, i can able to build a normal calculator by using java script but i am unable to read the key figure values from the analysis item on from the data provider in to by calculator by using on click function. I wanted to get the all the values in to a internal excel , so that my calculator can read the values from that. can any one help me on getting values in to internal excel by using java before the executing the web template ?...
Thanks in advance....
Jhon.
Edited by: sap bw on Jul 31, 2008 5:51 PM
Edited by: sap bw on Jul 31, 2008 5:52 PMI might not be understanding your question completely since you mention WAD and then Excel, but if you are asking how to get the key figure values using Javascript in WAD, you can go to the Dataprovider properties and enable 'Output Result Data'. This will embed an XML element into the HTML output that you can then parse using standard Javascript DOM navigation.
Hope this helps. -
How to do Front End Validation for JSP Forms using Java Script with 9iJD...
How to do Front End validation using 9iJD. Any wizard is there. We need to do the val. using Java Script. If its not available, please include that in the Production Release.
Thanks a lot. When is the Production Release is scheduled. Please tell us whether itll be available for Free Download. Bec, we couldnt buy. Bec, if its working fine with all the options without any bug only, we can ask our company to buy 9iJD by stating the advantages. Just explain us.
-
How to open PDF file in new window as default
I have .pdf documents into which I have inserted links to other .pdf documents using pdfEdit995
(I am a 77-year-old pensioner recording monumental inscriptions, not very computer literate and not able to afford expensive applications !)
The links in the temp.ps file (which pdf995 creates first) look like :-
[ /Rect [85 225 107 228]
/Border [ 0 0 0 ]
/Action /Launch /File (.\\Another Folder\\TARGET FILE.PDF)
/Subtype /Link
/ANN pdfmark
The links work fine, but open in the same window, which is annoying as it is then neccessry to re-open the original document, scroll down to the required page and find the next link.
pdf995 support say that perhaps Adobe reader can be set to open in a new window, but I want this to be the default when I circulate my file to interested people, so would prefer to modify the links.
Can anyone help with a smple solution ? (I also believe in Santa Claus !)
System: Vista; Reader X 10.1.0I don't know if you can change this in the PS file, but if you had Acrobat you could embed the following code into your file, that will make sure the links open in a new window. However, you should be aware that this code will change the preferences at the application level, which some people might not appreciate.
The code is:
app.openInPlace = false; -
How to open km document in same window
Hello all,
When working with KM Navigation iView such as AdminExplorer, I need to open a document in the same window or IFrame. I can't seem to find a way of doing so. The document always pop-ups.
Can anybody help?
Haguy
Message was edited by: Haguy EisHi there,
we had the same issue - I opened an OSS and got following reply :
<i>
<b>08.03.2007 - 12:45:49 CET SAP Reply</b>
I have checked from my development colleague and confirmed that
this parameter is not supported currently and development has recently
no plans to support this feature.
I apologize for the inconvenience caused here.
Thank you for your cooperation.
Best Regards
</i>
Can you believe this ? I don't, as this parameter has been around since SP12 or so and still there is no official note regarding this issue.
> Please reward points :o) < -
I have tried to open them as attachment to an email, and also as a file in my Adobe Reader XI file...same message "There was an error opening this document. Access denied." This began very suddenly--like something was 'turned off' in the system.
Funtbird1963The message means that a file which is needed to run Adobe Reader has been locked by the system. So it isn't exactly that Adobe Reader is turned off, but the effect is the same.
Something to try. Can you start Adobe Reader from the START menu in the normal way? If you can, are you able to use Open from the File menu to open a PDF? -
How to get pdf file from sap presentation server using java connector
Hi Friends,
with the below code i am able to get po details in pdf in presentation server.
DATA : w_url TYPE string
VALUE 'C:\Documents and Settings\1011\Solutions\web\files\podet.pdf'.
CALL FUNCTION 'ECP_PDF_DISPLAY'
EXPORTING
purchase_order = i_ponum
IMPORTING
PDF_BYTECOUNT =
pdf = file " data in Xsting format
*Converting Xstring to binary_tab
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = file
APPEND_TO_TABLE = ' '
IMPORTING
OUTPUT_LENGTH =
TABLES
binary_tab = it_bin " data in binary format
**Downloading into PDF file
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = w_url
filetype = 'BIN'
TABLES
data_tab = it_bin
when i am using java connector , to retirve the file from presentation server , the follwoing error i am getting...
init:
deps-jar:
compile-single:
run-single:
com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Error in Control Framework
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeExecute(Native Method)
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.execute(MiddlewareRFC.java:1244)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3842)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3287)
at PdfGen.<init>(PdfGen.java:35)
at PdfGen.main(PdfGen.java:78)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)
i debugged too, problem with <b>gui_download......</b>
I am very glad to all with your suggestions!!
Regards,
Madhu..!!Hi
You can try to create an external command (transaction SM69).......sorry I've forgotten,,,,they works on application
How do you call CL_GUI_FRONTEND_SERVICES=>EXECUTE?
Max
Edited by: max bianchi on Oct 13, 2011 10:27 AM -
Requirement: On click of button, I want the browser window to be closed.
Solution: I am calling below java script on "onClick()" event of button.
function close_window()
window.close()
This works in internet explorer but not in Mozilla Firefox. What is the reason behind it. Is there any way out to close the browser window in Mozilla Firefox?Can you post a link to a page that opens a pop-up window where a close button doesn't work?
Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
*Do not click the Reset button on the Safe mode start window or otherwise make changes.
*https://support.mozilla.org/kb/Safe+Mode
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes -
APEX- How to open world document (and other files) stored in a blob column?
Hi,
I have an application developed in Oracle Apex 3.2.1 and RDBMS Oracle 9.2.0.8 (SUN SOLARIS SPARC 64 BITS).
I have a table called BAC_ARQUIVO, with the following structure:
CREATE TABLE BAC_ARQUIVO
(NAME VARCHAR2(4000), /* Name of the file stored in BLOB column */
SUBJECT VARCHAR2(4000), /* A brief description about this file stored */
ID NUMBER, /* An identification of this file - It´s a PK column of this table*/
BLOB_CONTENT BLOB, /* Blob field that store diferent kind of files - XLS, DOC, PPT, PDF, EXE, ZIP, etc);
MIME_TYPE VARCHAR2(4000) /* Identification about which kind of file is stored on BLOB field */
The field BLOB_CONTENT of this table can store:
- Executable files;
- MS-World Documents (DOC);
- Zip Files (ZIP);
- Ms-Excel Files (XLS);
- Ms-Powerpoint files (PPT);
- Adobe documents (PDF);
Actually, in this APEX application, i have developed a interactive Report in which the user can download these files to desktop without problems.
But now, my user would like to know if it´s possible that APEX application can OPEN some of these files stored on this BLOB column WITHOUT download it.
My user would like to see a hiperlink (or button) that, if pressed/acessed, can open a new page (or a page inside application) with the document. He doesn´t need to edit this oppened file. He only wants to see it.
For example, if the file stored in the blob column is ms-word type , so the application will open a MS-WINDOWS application with these file.
Is it possible?
I saw in this forum that it´s possible to open a file stored on "/i/" directory, but i need to open the file stored in BLOB column. I don´t want to store the file in operational system of the server.
Could any one demonstrate to me how it could be done?
Best regards,
Sergio CoutinhoHi Sergio,
This link might be helpful:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r31/apex31nf/apex31blob.htm
Also refer the BLOB Download Format Mask :
{message:id=9716335}
Here I have given the format mask for APEX 4.0, which will slightly differ for 3.2.1 and proposed changes
in the format mask are:
1) Format Mask: DOWNLOAD
2) Content Disposition: Inline
This will be achieved with it:
>
But now, my user would like to know if it´s possible that APEX application can OPEN some of these files stored on this BLOB column WITHOUT download it.
My user would like to see a hiperlink (or button) that, if pressed/acessed, can open a new page (or a page inside application) with the document. He doesn´t need to edit this oppened file. He only wants to see it.
>
Hope it helps!
Regards,
Kiran -
THANKS.
Depending on which version of Firefox you're using, it no longer currently supports the plug-in provided with Adobe Reader. You have to use PDF Plugin 2.4.4. Just disable the Adobe plugin and use the Schubert plugin.
Clinton -
How to auto add in pdf filename (shown in footer) by using Java Script?
In order to have nice tracking a document, I want to print the file name as a header or footer when printing the documents.
How can this be done?
Found a perfectly nice post related to same issue
http://forums.adobe.com/thread/302996
(Many thanks on every contribuitors inside that posts)
In the above post, found that ##Reinhard had shared some well nice scripts for "enable to put in filename in the footer for every document, just by 1 simple click in each documents"
For the time being,
if i would like to generate a script that allowing
1) Only adding / showning the pdf filename in the footer
2) Auto Run/Execute on this script for all documents, which means without any click but it will auto showing the "filename at footer" when any document opening.
Hope any experts can give a help on this.
PS: Currently using Adobe Acrobat 10 & Reader 11 // OS = Windows 7
Many thanks ^^My code for above method is Floor #2
var FileNM = this.documentFileName;
for (var p = 0; p < this.numPages; p++)
var fd = this.addField("xftDate", "text", p, [30,15, 290,30]);
fd.textSize=5; fd.value = " (" + FileNM +")";
It works for me & my PC, however I unable to applied same things into a JavaScript.js file
Hope any experts could help and advice.
Many thanks. -
How can I find my custom panel in CS5 using java script
-I made an empty panel using Adobe Configurator 2 and then exported it to /Panels folder.
-My custom panel is now in photoshop and works.
-I added a simple code to onPanelInit():
function onPanelInit()
var myWindow = new Window ("dialog");
var myMessage = myWindow.add ("statictext");
myMessage.text = "Hello, world!";
myWindow.show ( );
so far so good.
Now instead of creating a new window like I did above, I want to use the new custom panel and add a text to it.
The problem is, how do I do that in java? Where can I find the panel that I should assign the text to?
I know that you can add the text in Configurator, or you can edit the .xml file and add the button there, but my
plan is to create a panel where i can add and remove buttons dynamically and that's why I have to do that in java.
Any help would be appreciated!
Cheers,
Petri JUse Runtime.exec() to run a OS specific command which retrieves OS specific info.
Or use JNI to access a OS specific API which returns the info you want. -
How to open pdf files in browser using flex
hi,
my project is having a Document explorer wchich contains pdf
files,iwant to open it in the browser.can any one tell me how to
open pdf documents using flex programming(i tried with different
thing like swf's but my client wants only pdf formatt).Another option is by calling a JSP page. This example will
open a pdf file into a new browser without displaying the download
"save" prompt.
Function to call the JSP:
private function downloadFlyer(event:Event):void {
var jspLink:URLRequest = new
URLRequest("jsp/downloadpdf.jsp?fileName=Fundraiser_flyer_2008.pdf");
navigateToURL( jspLink, "_blank" );
JSP code:
<%@ page errorPage="error.jsp" %>
<%@ page import="java.io.*" %>
<%
//Get the parameters
String downloadFileName=request.getParameter("fileName");
String fileName = application.getRealPath("/downloads/" +
downloadFileName);
File file = new File(fileName);
if (!file.exists()) {
throw new IOException("File does not exist.");
// Get the size of the file
long length = file.length();
// You cannot create an array using a long type.
// It needs to be an int type.
// Before converting to an int type, check
// to ensure that file is not larger than Integer.MAX_VALUE.
if (length > Integer.MAX_VALUE) {
throw new IOException("File too big.");
response.reset();
response.resetBuffer();
response.setContentType( "application/pdf" );
response.setHeader ("Content-Disposition", "filename=" +
downloadFileName);
//Prevent the Java error: "getOutputStream() has already
been called for this response"
out.clear();
out = pageContext.pushBody();
InputStream in = new FileInputStream(file);
OutputStream output = response.getOutputStream();
try {
int curByte=-1;
while( (curByte=in.read()) !=-1){
output.write(curByte);
} catch (IOException ioe) {
ioe.printStackTrace(System.out);
} finally{
output.flush();
in.close();
response.flushBuffer();
%> -
Opening pdf documents in browser impossible
Hi there all,
have problems opening pdf documents in safari window. On all of my macs (except for the macpro) pdf docs open in the safari browser window using the pdf plug-in. Installed plug-in list tells me that adobe pdf-viewer plug-in is available. Why doesn't it work ? Running Firefox, same problem. Application asks what to do : open with preview app (standard), but no other possibility, although I have latest adobe reader app. installed, as well as acrobat professional 8.xxx.
What is going wrong ? It seems pdf plug-in is not found or recognized. Help !Hi
You can view all pdf doc in solman itself just select the same and click display icon or just double click it it will open in solar01 or solar02 itself but wait for some time to get it loaded.
whereas if you want to open the doc in explorer just click the attributes and generate url and paste the same in explorer.
You can view in explorer this way.
If you are facing any issue in the above standard procedure please contact your basis team for the same.
Please reward points.
Maybe you are looking for
-
I want to order a second copy of an existing iPhoto book. Though created in the smaller format now only the larger format is showing. How can I switch an existing iPhoto book back to the smaller format?
-
Reader 10.1 issues - with 150% Display setting
I've waited a long time for the latest version of Reader (10.1.0.534) which came out yesterday. I keenly updated to it today and went testing (with my fingers crossed), only to find that it still doesn't fix the issues I'm encountering with my PCs Di
-
Error: while preparing dynamic sql
Hi, I have developed a new OAF page. I have created a empty VO (without query) and I am setting up query and executing the VO programmatically in the AM. in the same way I hava a table region (empty) and I am setting the fields for the table region p
-
XYGraph: export minimized data set for same plot form
hello all we are loading about 50'000 data points into a XY Graph. Assuming that the graph is 1'000 pixel wide and the line width of the plot is in minimum 1 pixel, we see about every 50th value when looking at the whole horizontal range of the data
-
Conditional terminal options?
Hi guys, Sorry if this has been asked before, I couldn't phrase it in a way that produced results in the search. I want to be able to have a conditional input on a SubVI. You can have the terminal being "Required", "Recommended" and "Optional" but I