Close Web.show_document Automatically

Hi,
I have a requirement from a multi block record, whenever user selects a record, it should open the file related to this record(pdf file) in a browser.
I know this can be done using Web.show_document.
But the problem is when user navigates to a new record and the file doesnot exist for the new record, then the first Web.show_document should close automatically.
How can this be achived?
Thanks in Advance
Prasad

Does it have to close or is replacing what is in the same window with the new records value suffice? This way you only have one window open and each successive record's pdf loads into the same window. Take a look at the second argument to web.show_document... _self
For example...
web.show_document('http:\\technet.oracle.com', '_self');
Im not sure how you are populating the first argument though.. You need a url refrence not a :block.item_name reference.

Similar Messages

  • Closing the browser windows created by web.show_document and javascript

    From Forms I am issuing a http request using web.show_document and javascript:window.open(). The http request makes a remote procedure call to a coldfusion component on a JRun appserver. I want this rpc to fire in the background so that the current forms browser window remains as is.
    The logic is as follows
    l_rpcURL := 'http://....just a standard URL.....'; -- edited for this thread
    l_jsURL := 'javascript:window.open("' || l_rpcURL || '","","fullscreen=no,titlebar=no,location=no,toolbar=no,menubar=no,status=no,resizable=no");self.close();';
    WEB.SHOW_DOCUMENT (l_jsURL,'_blank');
    The http request works fine but leaves a browser window behind. It's the one created by the javascript.window.open(). If I remove the self.close() from the javascript then I have two browser windows open, one from web.show_document and the other, as described previously, from the window.open().
    Any idea how I can force closure of the window opened by the window.open() ?
    Thanks

    Hi,
    did this occured afer installing service pack 2?
    A work around is The only solution that is to create a close.html file and calling this file in the code: Web.show_document('http://server:port/close.html','_self');
    <html>
    <body onload="closeit()">
    <script>
    window.close();
    </script>
    </body>
    </html>
    Monica

  • Title of the browser displaying a report output through web.show_document

    Hiya
    We are using Oracle Forms 10g 10.1.2.0.2
    All our Forms and Reports are working well.
    We are using Java Script in Web.Show_Document so that when the report is displayed on the screen in the browser, the browser's toolbar and menubar should not be visible.
    The code looks like this:
    v_url_in := 'reports/rwservlet' || '/getjobid' || v_job_id || '?server='|| 'my_rep_server';
    v_url_out := 'javascript:window.open("'||v_url_in||'", " ", "toolbar=no,menubar=no");self.close();';
    Web.Show_Document (v_url_out, '_blank');
    The above code is working absolutely fine. No issues about this.
    Now when the report opens in a new browser window,the title of the browser window reads as follows:
    http://<hostname>:8889/reports/rwservlet/getjobid1234?server=my_rep_server - Microsoft Internet Explorer
    So rather than displaying the title of the browser window as the URL of our Application Server, we want to show the title to Reports name so that it
    reads as
    'Customer Sales Summary Report - Microsoft Internet Explorer'.
    Does anyone has any idea if it is possible to change the title of the browser window, if so, how ?
    Cheers
    Mayur

    Mayur,
    I'm not a web developer either, however, I've done this kind of thing using the HTP database package - as I mentioned. What you could do is write a database procedure that accepts the URL and the Title as parameters and let the procedure open the URL for you. For example:
    CREATE OR REPLACE PROCEDURE show_url(p_url VARCHAR2, p_title varchar2) AS
    BEGIN
       htp.htmlOpen;
       htp.headOpen;
       htp.htitle(p_title);
       htp.headClose;
       htp.bodyOpen( cattributes => 'onLoad="WinOpen()"');
       htp.bodyOpen;
       htp.script(clanguage => 'javascript',
                    cscript => '<!--
                                function WinOpen() { open("'||p_url||'","_self");
                                //-->'
       htp.bodyClose;
       htp.htmlClose;
    END;I was unable to test this procedure on my Oracle XE install, but it should work on a non-XE database.
    Hope this helps.
    Craig...
    -- If my response or the response of another is helpful or answers your question, please mark the response accordingly. Thanks!

  • Automatic send mailto from web.show_document

    i use
    web.show_document('mailto:[email protected]&subject='||lv_subject||'%20&body=Date:%
    20%'||:SYSTEM.CURRENT_DATETIME||'%0A%0ATest Invio Posta elettronica from application server','blank');
    and work very fine.
    I want tiìo Know if it is possible to send email without open the editor (without the confim (send) from the user....
    Thank's The Vampire

    You can send mails at the middle tier using JavaMail integartion (see the 9i Forms Demos) or by using the UTL_SMTP package in the database. Both of these will allow you to generate messages from with the application and send them.

  • IE7 and web.show_document

    We run a forms application using 9.0.4 on IAS10gR1, JInitiator is 1.3.1.13. We often use web.show_document to display files (usually pdfs, but also other types) that are stored as blobs in the db or as files on the app server. From time to time users complain that this feature doesn't work anymore. In most cases this is caused by a popup blocker, either IE, or they use Firefox, or have installed Google's or Yahoo's toolbar with their popup blockers enabled.
    But now we are facing problems with users that have installed IE7. When they try to show a file which should be displayed using web.show_document, a new window flickers shortly and then disappears, even with the popup blocker disabled.
    Anybody out there with the same experience and (hopefully) a solution/workaround?
    And yes, I know that IE7 is not yet certified.
    Thanks in advance.
    Gerald

    We had the same problem opening files through web.show_document with IE7. It has to do with the Download settings in your Internet or LocalIntranet zones under Tools > Internet Options > Security > Select the zone > Custom level > Downloads group > Automatic prompting for file downloads setting.
    These prohibit IE7 to ask the user about downloading a file. That's why the new browser window closes right away. You could either change the settings for Internet and lower the security for all sites, or add your Forms server to Local intranet or even TrustedSites and set these up properly.

  • Web.show_document to print reports

    hi,
    i am using web.show_document to print reports. when i print a report, a new browser window is displayed, i don't want this to happen, or at least close the windows that appear automatically, i hope someone can help me.

    thank you deepak rai for your concern,
    i have tried all the targets in the show_document call. they either produced a new window, or replaced the current window containing the result of printing, i don't want any effect to take place on the windows, printing only.
    thank you again

  • [Solved] Problem with Web.show_document

    Hi all,
    In the custom.pll I use a Web.show_document() to get a file from the server.
    The URL is for example "http://10.0.0.20/test/159083.apn"
    I tested this and the browser (IE) is opening this file as a text file.
    Now I want that the .apn file must be opened with a specific program. So I added .apn to the registry.
    I typed manually http://10.0.0.20/test/159083.apn in the browser and the program I prefer is starting up now.
    But if the custom.pll executes the Web.show_document() now in a split second I see a flash of a screen and that screen is closed again. I don't know what screen but I think it is the browser.
    After that nothing happens anymore.
    Does someone here has any idea of what is going wrong

    Solved it.
    It's a browser security issue.
    In the custom security settings "Automatic prompting for file downloads" must be enabled.
    If this is disabled you normal get the yellow warning bar. But with Web.show_document() the browser opens and closes very fast.

  • Web.show_document-i dont want to open report in browser just save in folder

    Hi all,
    I m using the following code for pdf file generation using a loop. The problem is every report is open in browser and then save a pdf file in a specific folder. I want that report is not open into browser just save pdf files in a specific folder. Any body knows how i do this. I am using 10g developer 9.0.4.
    DECLARE
         v_SAM_CUST_ID     NUMBER(22);
         CURSOR C1 IS  SELECT
         SAM_CUST_ID
         FROM SAM ,DE_ADDR
         WHERE SAM.SAM_CUST_ID=DE_ADDR.DE_CUST_ID
         AND SAM.SAM_FREQUENCY IN ('DAILY','MONTHLY','Quarterly','Half yearly','Yearly');
    BEGIN
           if :TEXT_BOX1='S' then
           OPEN C1;
           LOOP
           FETCH C1 INTO v_SAM_CUST_ID;
           EXIT WHEN C1%NOTFOUND;
           --message('You have enter S'||v_SAM_CUST_ID);
           WEB.SHOW_DOCUMENT('http://plato:8889/reports/rwservlet?report=C:\CUST_PRINT1.rdf&P_1='||v_SAM_CUST_ID||'&cust_id&desformat=pdf&destype=cache&userid=wh1/wh1@dwh');
           END LOOP;
           CLOSE C1;
       END IF;
    END;
         

    This configuration file is present in the /reports/conf/ directory.
    It contains a few examples, very usefull if you want to hide some informaztion, like the connection string for instance.
    you can call it by setting the entry name in the url:
    http://machine.fr:7778/reports/rwservlet?my_entry&report=report.rdf&destype=...
    Francois

  • Report Status using web.show_document

    Hi all.
    I am using the web.show_document for running my report - using distribution xml file and mail.
    I want to insert a record in a table if the report generation succeeds.
    From Oracle Documentation I can see that I cannot get the report status in the form when it is run using web.show_document.
    And for distribution I cannot use run_report_object.
    Any workaround for this?
    Thanks in advance
    Anu.

    Dear Mr. hisham,
    Thanks For your Post,
    Actually i have the same issue, but it want to kill a running report in the report server by clicking such a button that have already the jobID.
    whithout opening the reportserver page so that no body see any other reports running.
    like in this example:
    Declare
    L_URL Varchar2(1000);
    Begin
    L_URL := :apps_server||'/reports/rwservlet/Killjobid'||:JOB_ID||'?'||'server='||:report_server;
    WEB.SHOW_DOCUMENT ('javascript:window.open('||l_URL||');self.close()','_blank') ;
    End;
    Is it posible to do that, If so how can do it. and do i have to do any settin someware on the server like formsweb.cfg or reportserver.cnf.
    thanks in advance.

  • WEB.SHOW_DOCUMENT opens additiional IE browser.

    Hi All,
    I am using web.show_document (web.show_document('file:///file_name','_blank') ) to open pdf and msg files stored at a location. For PDF files, web.show_document works fine and pdf file gets open. However for msg (email) files, a new browser gets open along with msg file. User need to close this additional browser.
    Also the word files opens in IE browser. We need not to open MS office files in IE browser.
    Any suggestions to overcome this issue.
    Regards,
    Vinit
    Edited by: Vinit on Feb 21, 2011 2:37 AM

    Vinit,
    Your code explicetly opens a new "Blank" browser window. The reason the new browser window goes away with the .pdf files is because you have an OS MIME association for .pdf's which controls how the file is opened on the OS. Clearly, there is no MIME association for the other file types.
    web.show_document (web.show_document('file:///file_name','_blank') )Try '_self' or '_parent' in place of '_blank'. For more information on the Web.Show_Document built-in please check the Forms Help system.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on Feb 22, 2011 1:11 PM

  • Web.show_document() with javascript

    Hi Guys,
    I'v been searched this forum about web.show_document() with javascript.
    I saw some threads said
    I can do like
    WEB.SHOW_DOCUMENT ('javascript:window.open("http://www.google.com","","fullscreen=no,titlebar=no,location=no,toolbar=no,menubar=no,status=no,resizable=yes");self.close()','_blank');
    and someone said it worked, but it doesn't work in my machine.
    also some one said the javascript engine is not included in Form 10.1.2, so I can not use WEB.SHOW_DOCUMENT function like above.
    My form builder is 10.1.2.0.2 (Production), os is xp sq2 ,ie 6.(ie6 has some tighter security)
    I want to get clarification about this function, can i use the javascript on it or not ? I really want the pop up window without toolbar and customize size. I need do some configuration in formweb.cfg also?
    Thanks in advance. I appreciated every response.
    Appcat

    Hi Jan,
    Thanks for your reply. I check the metalink about it.
    The first solution is
    1. Make forms Developer URL a trusted site in IE to allow script executions.
    For that open Internet Explorer->Internet Option-> Security.
    Select the "Trusted Sites" Option.
    Click on the Sites Button.
    Add the Developer Suite URL in that.
    for example
    http://<Yourmachinename>:8889/
    It doesn't work in my machine ,still can not activate the javascript.
    The second solution is
    2. Place the script invocation code in a html file in Oracle_home/forms/server directory and call it.
    For example :
    Create a simple form.
    In Forms Trigger :
    web.show_document('http://<Yourmachinename>:8889/file.html');
    In the file.html you may enter the code, for example:
    <HTML>
    <HEAD>Heading</HEAD>
    <BODY>
    <SCRIPT LANGUAGE="Javascript">
    window.open("http://www.yahoo.com","_self");
    </SCRIPT>
    </BODY>
    </HTML>
    It also doesn't work in my machine, the problem is http://<Yourmachinename>:8889/file.html can not be found, even i put it under the Oracle_home/forms/server folder, but i click it directly ,the javascript works. that means the URL http://<Yourmachinename>:8889/file.html is incorrect or I should put the html file into other directory. And I also checked the default.env,FORMS_PATH=D:\DevSuiteHome\forms.
    anything wrong with my env?
    Do you have any idea about it?
    Thanks,
    Appcat
    Message was edited by:
    user577805
    Message was edited by:
    user577805

  • Web.show_document and File Save As

    Hello,
    I have a Perl CGI scrfipt on the server that I can call from a web brwoser. Its purpose is do save a file passed in to any locatgion on the PC.
    In the borowser I can use:
    http://devpong/cgi-bin/cap/savefile.cgi?dirpath=/capexp/to_SGP&fname=ZU060920.C78
    and I get a Save As dialog and it is written to that directory. Works very well.
    This is the Perl CGI code:
    use CGI ':standard';
    use CGI::Carp qw(fatalsToBrowser);
    my @fileholder;
    my ($web_keys)= ["dirpath", "fname", "mode"];
    my ($Param) = get_params($Param, $web_keys);
    # print_head($Param);
    # redirectwindow($Param);
    open(DLFILE, "$Param->{dirpath}/$Param->{fname}") || Error('open', 'file');
    @fileholder = <DLFILE>;
    close (DLFILE) || Error ('close', 'file');
    print "Content-Type:application/x-download\n";
    print "Content-Disposition:attachment;filename=$Param->{fname}\n\n";
    print @fileholder;
    I want to do the same thing from the Forms 6i application. In web.show_document I put in the exact same URL that works stand alone in the browser and have tried all of the seceond argument setting (_BLANK, etc.). Just for a millisecond a window opens then immidately closes. I have included a raise FORM_TRIGGER_FAILURE in the trigger to make it wait, but to no avail.
    I found a document that said if a URL works in the browser, it will work in web.show_document. That is not true for me.
    Do I need to build an html page first to open in the borwser from web.show_document?
    Does webutil_file have the ability to let the user choose the destination directory?
    What we did in the past was to make sure the file extension was not in the registry of the PC. Then the browser would force a Save As dialog. With XP SP2 this does not work without making several changes to the file types.
    That is why I would like a solution that does not rely on file type set up.
    Any suggestions will be appreciated.

    Well, it sounds like you want the server to tell the client that this content shouldn't be read from cache...
    Among the posible solutions:
    Apache can be configurated with modules like 'mod_expires' and 'mod_headers'.
    Or, you could write a JSP file that sets the appropriate http headers and streams your file accordingly. The http headers I think you're interested in:
    - cache-control (to prevent client caching)
    - content-disposition (to set the filename of the download)
    You might want to read this thread:
    http://p2p.wrox.com/topic.asp?TOPIC_ID=29405
    Cheers,
    Mel.

  • Mailto with web.show_document

    Hi,
    I am using the mailto as below
    web.show_document('mailto:[email protected]&subject='||lv_subject||'%20&body=Date:%20%'||:SYSTEM.CURRENT_DATETIME||'%0A%0APlease find the generated file in pdf format','blank');
    I am sucessful in generating the mail to, subject and the mail body but is there a way by which i can automatically attach a mail attachment (could be a pdf file just generated before this code executes.
    or does someone have a better idea as my requirement is that as and when a transaction is complete a user will select a check box and execute a button (send mail), for the same transaction i want to generate a PDF file ad send it to the selected group, but i do not want this as a silent background process (it should open a new outlook window) with the generated report as an attachment.
    I can generate the pdf file and also open a new outlook form but the attachment is the issue.
    Regards
    Melvin

    Melvin,
    there exists no parameter for attaching files to an email using "mailto".
    Source: http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q188/0/19.asp&NoWebContent=1
    The format for the MAILTO protocol is as follows:
    MAILTO:Recipients&Parameters
    The Recipients field can be blank, a single e-mail address, or multiple e- mail addresses separated by semicolons (;).
    The Parameters are optional and have to be separated by an ampersand (&). Parameters appear in a name/value pair format. Following is the list of parameters available in Internet Explorer: PARAMETER DESCRIPTION
    CC= Carbon copy
    BCC= Blind carbon copy
    SUBJECT= Subject text
    BODY= Body text
    Fran

  • Troubles with web.show_document and internet explorer

    Hi folks, this is my problem
    I generate a text file on forms and then I use this to open the document in a new window
    web.show_document( nome_ver_, '_BLANK' );where nome_ver_ is a variable with the url
    Using mozila firefox this run fines and a new window is open and everything goes right.
    But in some machines with the internet explorer the new window appear and then close in milliseconds. I try different's versions of IE on the machine and still have the problem...
    Anyone see this bug?
    I try to disabled everything on secure on IE and still nothing...
    Sorry for my bad english and thanks in advance
    Luis

    You are generating a text file you say. Is it a pure text file? Or is it html that you wnt the user to view in the browser?
    In what versions of IE is this happening in?

  • Web.SHOW_DOCUMENT (url, target);

    if I will use
    web.show_document('javascript:window.close();','_self');
    where it is looking for javascript. I'm afraid that something I did not configure. If somebody can explain how it is working then you try call javascript in web.show_document?
    Pleas help

    I wouldn´t suggest using this coding style..
    web.show_document('javascript:window.close();','_self');
    Why ? Well its seems to me you would want to centralise your javascript in one place.
    Why not use ..
    web.show_document('html/close.html','_self');
    ..and then add the javascript to the close.html file.
    If things should change in the future( add extra javascript..) you only have to edit close.html and not all the forms where you added this call.
    Ofcourse you have to define aan extra virtual mapping
    for /html/ in the web-orion file for the developer installation and/or the forms90 config file for the application server installation.
    Seems a better alternative.
    greetings Dave

Maybe you are looking for

  • Hard lock ups multiple times a day - How can I troubleshoot?

    My machine locks up hard multiple times a day. If I happen to be sitting in front of it, I observe that the image on the monitors stops changing. Mouse and keyboard will not work at all (including Magic key SysRq sequences). I cannot ping the box fro

  • F110 not picking up documents for payment

    Hi Gurus, When we run payment proposal, few lines are not getting selected for payment. Only first line item is getting selected , remaining are ignored. Payment method is same for all. there is no payment blocks. pl advice what other points to check

  • How to find Discussions URL

    I was wanting to tell a new Mac user how to find the Apple Discussion link (i have it bookmarked). I went to Support but could not find the link to Discussions. Has this been removed from support? How do I tell them to locate it?

  • How to delete iMessage on iphone? Completely complete it.

    How do I completely delete iMessage from my iphone?

  • SAP ECC 6.0 EHP5 with Opentext VIM 7.0 - Question on System Copy / Refresh

    Hi We are planning to perform a system refresh of our QA systems (platform: Windows / SQL 2005).  The ECC system has Opentext Vendor Invoice Management 7.0 on it. I was looking for some documentation explaining the Pre and / or Post system copy (refr