Java Script in OAF to open a client machine Application
I was trying to use java script in OAF to open any kind of application located on client machine like notepad, calc etc..
Here is my original java script
<html>
<script Language="JScript">
function runcmd() {
File='mspaint.exe';
WSH=new ActiveXObject('WScript.Shell');
WSH.run(File);
</SCRIPT>
<input type="button" value="run" onclick="runcmd()"/>
<html>And my code OAF processRequest is
String s = "function runcmd() {File='mspaint.exe';WSH=new ActiveXObject('WScript.Shell');WSH.run(File);}";
//getting body bean
OABodyBean bodyBean = (OABodyBean)pageContext.getRootWebBean();
//attaching javascript function to page
pageContext.putJavaScriptFunction("runcmd", s);
// calling this function on load of body bean
String javaS = "javascript:runcmd();";
bodyBean.setOnLoad(javaS);And when run it doesn't open application.
Also can the java script be attached to a button click.
Thanks
Edited by: user11376651 on Aug 25, 2011 6:36 AM
Edited by: user11376651 on Aug 26, 2011 7:30 AM
hi
I see that you are using ActiveXObject , it works only in IE 6 or earlier versions try using XMLHTTPREQUEST.
Similar Messages
-
Form ARXTWMAI.fmb is not openning in client machine
Hi All,
I am using EBS version 12.1.3
and oracle form builder 10g.
When I am trying to open a form(ARXTWMAI.fmb) in the oracle form builder(client machine) has stopped working and leads to close the form builder
I loaded all the dependent forms(.fmb) and libraries(.pll) into client machine
while other forms are opening perfectly.
Please let me know what could be the reason
and how can I open this form.
Thanks in advance.
Regards,
Jenney.i guess you have compiled the form with different patch then it actual was.....
confirm with other party what Patch they were using in Forms 6i
like Application was developed with Patch 16 but you modified with Patch 18 and deployed it Others forms are still compiled with Patch 16.
Baig
[My Oracle Blog|http://baigsorcl.blogspot.com/] -
Java Script Question (No Toolbars, ... for whole application)
Hi Everybody!
I have the following problem. We have created a web-application, which consists of about 100jsp pages and several class-files.
Now we want to hide the toolbar, the menubar and the addressbar for every jsp page in the application. I know, that normally this is done by using window.open(...) but then I had to alter every link in the nearly finished system.
Is there another possible solution to achive this goal with minimum effort?
Thanks in Advance!
Stefno, but why do you have about 100 window.open() calls? Most web applications don't jump between windows. And it's not like you can hide that stuff in the current window anyway.
-
Launching EAS from URL not working on client machine.
We are on version 11.1.1.4. When I use EAS URL on the server it is working fine. But when I use from a different machine other than the server it is not working, after selecting the "locale country" and clicking launch button it is giving the following error. i checked the java version also and client machine is on 1.6. I also tried on different IE versions. But from the same client machine I am able to connect through the installed version of EAS.
Is something I need to open ports or anything like that. Please let me know your suggestions or comments.
HTTP Status 404 -
type status report
description the requested resource () is not available
Hyperion embedded java container/1.0.0
Thanks,Shiva -- Java version on the server and the client machine is same which is 1.6.0_24.
That is good point about the network. Actually the client and the server are not in the same network but I opened ports on the network router as well as I disabled windows firewall on the server to make sure it is not creating the problem. -
I am not sophisticated at understanding computer language. What I know is that 3 things have happened in the last 2 weeks.
1.My yahoo account which I go to from Mozilla firefox 4.0.1 now requires me to click on a link that says it disables updates. Then my homepage seems to be ok/normal except:
2.One of the email links tries to open a site called Ok Cupid and that site is really distorted and unreadable
3. another website www.texastrails.org has a tab called 'docs' which can be reached from "member portal". There should be documents in Word and adobe reader on the left side of the screen which can be opened normally. These do not exist now and the texas trails webmaster says it has to do with Java Script. (it does open in Internet Explorer)
Why would these two sites open in IE but not firefox?
Note that I went to "My Computer" and found I have environment 5.0 Java6 update 24 and J2SE Runtime environment 5.0update 6 on different lines. I have no clue what these mean:-)
I also click on Firefox "tools" and see that java is checked/enabled.This is not an answer. I have the same problem, what gives? None of the "solutions" have worked. The only thing left I haven't tried is resetting my IP an disabling my routers firewall, which is dangerous. Guess I might just keep on using IE instead, sure it's annoying, but hey it works.
-
How to call a java script method to open a saveAS dialog box in MAU .
Hi All,
I am Enhancing the MAU application.
I want a link in my order detail page , say open a link
When I click on that link a save as dislog box should open.
With a normal jsp and java script it can be done easily , but not sure about the coding to be included in MAU enhancement.
Can any one help me regarding this java script coding to be inclded in MAU.
Thanks and Regards
Neha MahantyHi Neha,
have a look into the enhancement documents of MAM / MAU. There you can see that the documents (JSP and controller) have to be enhanced in a way, that you add a Z_..... module to your project for each changed file. (In Simple Words)
Because this is the case, you can enhance your JSP with the stuff you like as long as you do it in the Z....JSP page and then it should be straight forward - as you said.
Hope that helps!
Regards,
Oliver -
New to Java Script(Want to open a new window using Java Script)
Hi all,
I am new to using Java Script. Now I have a HTML(First.html) page with a ADD button at the end of the page. What I want to know is, if I drag and select some part of the First.html and click on the ADD button a second HTML page(Second.html) should open displaying only the selected contents....
Please help :-(myRef = window.open(self.location,'mywin',
'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); -
When on a site with a PDF download I wish to open, when I click on download the site commences to open in a new Tab but the information does not come through? This happens on all sites. The advanced Java Script is disabled. The new tab will sometimes flash black then go white with nothing else happening or just go white & nothing else?
I had the same problem and also had PDF Download 3.0.02 installed. By removing this addon I can now select a PDF document which then opens up a normal Open With/Save dialogue allowing me to open the file or save it. Hope this helps.
-
Opening ADF page from java script
I am trying to use window.open(url, winName) to open an ADF page from java script.
I have set the same winName but when i call the window.open method every time it opens up a new window.
The code is as below:
<html>
<head>
</head>
<body>
<script>
function openwin() {
window.open("about:blank", "winDocPrint", "width=800,height=600,location=no");
</script>
<form action="http://127.0.0.1:7101/RegionRefresh-ViewController-context-root/faces/EnterAndDisplay?_afrLoop=3611588465186&_afrWindowMode=0&_adf.ctrl-state=zoaas2mc3_4" target="winDocPrint" onsubmit="openwin">
<input type="submit" value="Print Comments Call ADF">
</form>
</body>
</html>
when I click the button first time, it opens a new window, and keeps opening a new windows on clicking the button again.
I want it to use the same window that was opened first time.
Any help would be appreciated.
Thanks,
Sandeep M.
Edited by: user8895611 on Mar 25, 2010 11:44 PMHi,
you need to keep the window handle reference so you can access the same window
http://www.irt.org/script/874.htm
Frank -
TypeError: this.oRoot.enable is not a function
This is popping up when I befor I open my browser,in a pop up box under the heading JAVA SCRIPT EXE. What is it, how do I get rid of it?I did it in my computer, but I can not uninstall the Site Advisor alone. I need to uninstsll the the total McAfee plus. What should I do?
But another user in my computer they do not have this problem. If I try to use IE or Chrome etc , I can not find this problem. I use firefox since 2006 and do not want to change another one. What should I do?
By the way I have this problem after I update Firefox6 3 weeks ago and always allow 1 plugin work. The other user in this computer they just allow firefox plugin working 1 times.
It will pop out if I disable the siteadivsor.
many thanks -
Java script application appearing everytime i open a new tab
Hi,
Everytime I open a new tab on my computer, a message pops up with Java script application in a box with a yellow triangle with an exclamation mark symbol. I have to click ok twice before I can continue using the internet.
Can you please tell me how to fix this, I think this happened after I upgraded my mozilla website.hello annap2677, you have quite a few malicious addons present. please try these steps:
# [[Reset Firefox – easily fix most problems|reset firefox]] (this will keep your bookmarks and passwords)
# afterwards go to ''firefox > addons > extensions'' and in case there are still extensions listed there, disable them.
# finally run a full scan of your system with different security tools like the [http://www.malwarebytes.org/products/malwarebytes_free free version of malwarebytes] and [http://www.bleepingcomputer.com/download/adwcleaner/ adwcleaner] to make sure that adware isn't present in other places of your system as well.
[[Troubleshoot Firefox issues caused by malware]] -
Error in a array populated using jsp in client-side in java-script
hii ,
I have this problem.
I have populated an array with records in jsp.The array is being populated correctly ..i hav check it .
Now I need to get back this array in client side in a java-script function.
I need this bcoz i need to check whether the value entered in a particular field in the form is there in the table before the form is submitted...hence the need of array.
Surprisingly in my java-script function i can get back the length of array,but as soon as i am writing something like arr[0] where arr is the name of array populated in server side using jsp,i am get scripting error.
i.e a code like
funtion partynamecheck()
var n=<%arr[0]%>
alert (n) ;
is giving scripting error.i.e showing error in page at the bottom left -side of browser.
but code like
funtion partynamecheck()
var n=<%arr.length%>
alert (n) ;
} is working fine.
Please help ..all wrk stuck.
ArnabHi,
i cann't help you with javascript, but the jsp-expression must have this syntax
var n=<%=arr[0]%>
Hope this help!
Roland -
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 -
Do I need to pay anything to Adobe if I inject java script using some open source library?
Hello,
I want to restrict PDF reader to achieve Digital Rights Management (DRM).
Do I need to pay anything to Adobe if I inject java script to achieve so using some open source library?
Basically I want my PDF documents to be restricted such that I can:
Limit printing
Prevent screenshots
Restrict access by license expiry date
Restrict distribution of downloaded PDF (i.e. the document should run on specific machine only)
Restrict copy and paste within PDF document
I came across below links from which I suspect Adobe expects one to pay if he/she attempts to restrict reader functionality in some way?
http://www.adobe.com/devnet/reader/topic_drm.html
http://www.adobe.com/devnet/acrobat/overview.html
Am I correct in my assumption?I think it is a vain hope to imagine you could implement DRM via JavaScript. Remember it can be turned off.
Printing is either enabled or disabled according to document security.
Working with PDFs does not require permission from Adobe but
* adding functionality to Adobe Reader definitely does; a DRM development license is a major investment.
* if the file is Reader-enabled, all third party tools will disable that. -
How to Open a file by JAVA SCRIPT in ABAP?
Hi Experts,
i'm trying to open a pdf file in java script (ONLY) through ABAP.
Is it possible? If so how?
The java script what we write in HTML is "window.open("C:
Temp
file.pdf");"
Please advice ASAP.
SomnathHi,
You have to make the Vi reentrant so that it does not share the same memory location:
Regards,
Even
Certified LabVIEW Associate Developer
Automated Test Developer
Topro AS
Norway
Maybe you are looking for
-
How can I get scripting access to color values in the indexed Color Table?
Hey all, I'm relatively new to Photoshop scripting, but I've just finished a script that helps my fiance with some very tedious tasks related to textile design. The last issue that I'm having is that the image I start with is indexed and has a very s
-
How we can get the output in excel format for Spawned programs?
My requirement is to get the excel output for some of the programs (like -Adjustment Register, Applied Receipts Register). I am trying to achieve this by BI Publisher. But these programs has "Spawned" executable. And when I am changing the output typ
-
Dialing and recieving changes which had been done in ios 7.1 is worst than ever why you making it smaller make it bold like before as in ios 6.
-
I have the Creative suite 6 premium teacher edition installed on a mac and I want to install Premiere Pro and Photoshop ONLY on a separate macbook. How do i do this?
-
Error : Syntax check form not found in function group program
Hi All, I have a function group ZMRMK. In its source code the function-pool SAPLZMRMK contains error "Form XYZ does not exits" There is an include in SAPLZMRMK named lzmrmkf01 : in this include there is an include lmrmkf02 . Here XYZ is called-> pe