Home » Developer & Programmer » JDeveloper, Java & XML » use of javascript:window.open to call reports
use of javascript:window.open to call reports [message #259107] Tue, 14 August 2007 07:31 Go to next message
shrad
Messages: 6
Registered: July 2007
Location: Mumbai
Junior Member
In 10G, currently I am using following code to call reports

v_url:='http://www.oracle.com';
web.show_document(v_url,'_blank');

but this show url in new window.

I am trying to use javascript:window.open to hide this url by following script but it does not work.

WEB.SHOW_DOCUMENT ('javascript:window.open("TARGET=_blank>http://www.oracle.com","","fullscreen=no,titlebar=no,location=no,toolbar=no,menubar=no,status=no,resizable=yes");self.close()','_blank');

it does not open another window and also it is not showing any error message also.

pls help
Re: use of javascript:window.open to call reports [message #260341 is a reply to message #259107] Sat, 18 August 2007 12:48 Go to previous messageGo to next message
kmmfoo
Messages: 38
Registered: June 2005
Location: massachusetts
Member
Hi --

You haven't received an answer in a few days, so although I have never even _HEARD_ of the web.show_document command, I'm going to take a stab at addressing your issue more generically. I suspect that web.show_document is part of some PL/SQL package and you're writing something inside the database. Are you? If so, I'd suggest you review the title of this forum.

But let's give you the benefit of the doubt, and address the question anyway.

First, from the example given is seems likely that your "show_document" works similarly to the standard HTML javascript "window.open()" command. Is that correct? If so, what does a "window.open()" look like? Most generically it looks
var windowref = window.open(name, url, parms);

So okay, the "name" parm can be used to refer to the created window later, the "url" parm gives the url you're trying to load, and the "parms" parm identifies specific display options for the target window. Let's assume all of the details from your earlier attempt are what you intended, and try it again. The window.open command would look like
var name = '_BLANK';
var url = 'http://www.oracle.com'; // which is silly, but whatever
var parms = 'fullscreen=no,titlebar=no,location=no,toolbar=no,menubar=no,status=no,resizable=yes';
var windowref = window.open(name, url, parms);

or, possibly, if we wanted to do it all in one command...
window.open('_BLANK', 
    'http://www.oracle.com', 
    'fullscreen=no,titlebar=no,location=no,toolbar=no,menubar=no,status=no,resizable=yes');

Now like I said, I don't know from web.show_document, but that's the way we'd do it in javascript. To clarify, there are a few things we seem to have left out from your earlier example:
  • no "TARGET=" directive
  • no left-angle-brace between the BLANK_ and the url
  • no "self.close()" command
  • no extra "_blank" at the end

Are those things important? Don't know.
Re: use of javascript:window.open to call reports [message #261667 is a reply to message #260341] Thu, 23 August 2007 05:20 Go to previous messageGo to next message
shrad
Messages: 6
Registered: July 2007
Location: Mumbai
Junior Member
Hi,
web.show_document is built in function available in oracle 10g for calling reports in form/application.
I am using this function on when-button-pressed trigger.
Basically by using web.show_document we are calling reports as follows:

declare
rep_param varchar2(100);
rep_param1 varchar2(100);
v_url varchar2(300);
begin
rep_param:='pay_date'||:payable_date; /*' pay_date' is user parameter in RDF file and :payable_date is datablock item in form*/
rep_param1:='loc_cd'||:locn_code;

v_url:=' http://mercury2.shcil.com:8720/reports/rwservlet?report=esi_ledger.rep&desformat=pdf&destype=cache&userid=esitest/lotus12 3@esitest&'||rep_param||'&'||rep_param1;

web.show_document(v_url,'_blank');

end;

Mercury2.shcil.com is our internal server(intranet)

Here when fresh window opens up to view reports in url user can see the userid with password.
Hence to hide the url details , we were using

web.show_document('javascript:window.open("'||v_url||'","","fullscreen=no,titlebar=no,location=no,toolbar=no,status=no,resizable=yes ");self.close()','_blank');

But this does not work.


Plese suggest or guide on this.
Re: use of javascript:window.open to call reports [message #261730 is a reply to message #261667] Thu, 23 August 2007 08:05 Go to previous message
kmmfoo
Messages: 38
Registered: June 2005
Location: massachusetts
Member
Oops... sorry, my bad. I don't know anything about solving your problem, except that, ummm... the string you're using is not a URL.

Also, I must have made the mistaken assumption that your question had something to do with either JDeveloper, Java, or XML.
Previous Topic: loading java classes to Oracle
Next Topic: XML file from Blob datatype table
Goto Forum:
  


Current Time: Wed Dec 07 12:27:27 CST 2016

Total time taken to generate the page: 0.09555 seconds