[AS & JS] [CS4] Execute javascript from actionscript

Hi,
I've written a folder action in Actionscript to open a Indesign file. I would like to execute a javascript that a wrote before. Is it possible to launch a javascript from within a actionscript? Does the actionscript wait to continue until the javascript is completely executed?
Thanx
John

Scott,
I have no idea how I got this new OTN Id? Tell me what you know!
I signed on using what I believe is my regular Email Address, but I am no longer attached to the old OTN Id. And I no longer have the gold medal next to my name. Isn't that sad :(
I really ticks me that we are still (after how many years with Oracle) unable to change our Email Address and keep the same account. What is that with Oracle? Can't anyone teach those people good design (like don't use an externally supplied key as the internal identifier for your customer). I recently sold my Web Domain, and so my Email Address will soon change. The new owner is allowing me to keep my Email Address until Feb 2008.

Similar Messages

  • Execute javascript from plsql in a dynamic action.

    Is it possible to execute javascript with htp.p from a plsql block in a dynamic action (on change).
    I have tried it but I get a JSON error.
    The reason I want to to this is:
    I have to check something with plsql and depending on the result I want to do something in javascript.
    I now going to try it with ajax from javascript, but if somebody has a other way to do this i like to hear it.
    Thanks,
    Fred.

    Very neat, many thanks.
    I now have a 'Set Value' 'Javascript Expression' action of 'this.triggeringElement.id;' to set a hidden *but unprotected* page item. This is followed by the 'Execute PL/SQL' action which simply calls a package procedure and passes the name of the triggering item. The procedure then sets the session state(s) as required.
    Thank you!

  • Unable to execute javascript from backing bean

    Hello experts,  I want to execute  javascript function from backing bean method.   
    In my .jsff  page,  I have added  the javascript as :
    <jsp:root  ..... >
    <af:resource type="javascript" >
              function fileDownloadJS() {
                                alert(" tesing js from backing bean");
        </af:resource>
    </jsp:root>
    in my backing bean method  :
    public void callJSfuntion(ActionEvent actionEvent) {
            RenderKit rk = FacesContext.getCurrentInstance().getRenderKit();
            ExtendedRenderKitService erks = (ExtendedRenderKitService) Service.getService(rk, ExtendedRenderKitService.class);
            erks.addScript(context, "fileDownloadJS();");
    I have table in my .jsff page,   inside table column,  I have command link  and when I click the link,   I am invoking bean method  :
    <af:table  ....>
        <af:column sortProperty="title" sortable="true"  
                           headerText="File name" width="250px" id="Title"
                           clientComponent="true">
                  <af:commandLink   id="cl1"    actionListener="#{MyBean.callJSfuntion}" clientComponent="true">  
                    <af:outputText value="#{row.title}" id="ot1"/> 
                  </af:commandLink>
         </af:column>
    .</table>
    But when  I  run my taskflow and  click on  the link inside the table column,    JS function is not invoked.
    Absolutely  no clue what  is the issue.
    Appreciate if you can  help me out to resolve this issue.   Thank you.

    For debugging purpose can you try :
    <script type="javascript" >
              function fileDownloadJS() {
                                alert(" tesing js from backing bean");
    </script>
    put it on top of the page and let me know what happens.
    If it doesn't work try writing the function itself in your addScript(context, script); to see if it works.

  • Execute Javascript from our JAVA code

    Hi all,
    I have a question:
    It's possible to execute a javascript code from the back bean page. For example , we execute a button action (Conect to a db, insert data) and if all it's ok we execute a simple alert ("The insert is ok!!");
    Any way to do this??
    Thx!

    I don't know enough about Javascript, but I don't think it can be executed from within Java code.
    If you can't, an alternative is to provide a status code and/or status message that is accessible to the page. There are a number of ways to do this. One option is to put the information in a hidden field. Another option is to put the information in a session bean and add appropriate JSP code to your page to get that information.
    You can link a Javascript function to the page's onLoad event. The function can get the status code/status message and create the alert.

  • CS4 do javascript from AppleScript

    Hi all,
    Consider this AppleScript snippet:
    tell application "Adobe Illustrator"
    do javascript myFile with arguments {"one", "two"}
    end tell
    The file "myFile" is executed OK, but how does myFile (a JavaScript script) get the arguments passed in from AppleScript? I don't see this documented anywhere.
    Thanks,
    Chuck

    Since nobody answered this:
    In your Javascript, you will find an arguments array containing the arguments you passed from Applescript or VBscript
    So, using your example, if you added this line to your JSX file:
    alert(arguments[0]);
    You would get an alert saying "one" when you ran your Applescript.

  • Execute JavaScript from Item Region Button

    How do I execute a JavaScript using a button displayed among this region's items?
    When I create a "button in a region position", I am given the "Optional URL Redirect" which can be used to specify the JavaScript as the URL Target. This option is not available when the button is created to be displayed among the region's items - and I don't understand why there is this limitation on Item Level Buttons.

    Scott,
    I have no idea how I got this new OTN Id? Tell me what you know!
    I signed on using what I believe is my regular Email Address, but I am no longer attached to the old OTN Id. And I no longer have the gold medal next to my name. Isn't that sad :(
    I really ticks me that we are still (after how many years with Oracle) unable to change our Email Address and keep the same account. What is that with Oracle? Can't anyone teach those people good design (like don't use an externally supplied key as the internal identifier for your customer). I recently sold my Web Domain, and so my Email Address will soon change. The new owner is allowing me to keep my Email Address until Feb 2008.

  • Using a Java Program to execute JavaScript from a website

    Okay, let me try and explain as good as I can. I have a program now, that searched through all files and folders in Unix (Solaris machine) and gets the list of files in the bin and sbin folders.
    Well, I want to find the version of each of these files from the bin and sbin folders and not all of them have the -v, -V or -version feature (or any others there may be). But, I found this page:
    http://sunsolve.sun.com/pub-cgi/fileFingerprints.pl
    where if you go to the page I can find an md5 number, place it in the box and click submit to find versions, if available.
    My thing is, as I find the number from my java program, I want to be able to open this page, insert in the box (or maybe even call the javascript function) and then submit to get the version numbers. That would mean I could need to get back info from the javascript function.
    I hope that explains what I need and hope that someone can help me.
    I have found information on the JSObject, but not sure what that means exactly so if someone can explain this:
    JSObject win = JSObject.getWindow(this);
    JSObject doc = (JSObject) win.getMember("document");
    JSObject loc = (JSObject) doc.getMember("location");
    String s = (String) loc.getMember("href"); // document.location.href
    win.call("f", null);     
    it would be greatly appreciated. But, this may not even be what I need. I see that the win.call is where I would call the function needed and I am guessing the null could be where I put the number if that is how the function i need works like that. But, what I dont understand is what "document" is and "location". Also, i the "href" the page I put above? I am just lost on that. Hope someone will understand.
    Thank again for the help!

    Exactly so. Check out the last item - reading and writing to a URL - writing to a URL.
    Pulling out the form code from that page:
    <FORM METHOD="POST"  ENCTYPE="application/x-www-form-urlencoded">
    <TEXTAREA NAME="md5list" ROWS=16 COLS=66 MAXLENGTH="33792"></TEXTAREA>
    <BR><INPUT TYPE="submit" NAME="submit" VALUE="submit">
    <INPUT TYPE="reset" VALUE="reset">
    </FORM>You should end up with something like this (copying and pasting from the example):
    URL url = new URL("http://http://sunsolve.sun.com/pub-cgi/fileFingerprints.pl");
    String sNumbers = "put your serial nos in this string"
    URLConnection connection = url.openConnection();
    connection.setDoOutput(true);
    PrintWriter out = new PrintWriter(connection.getOutputStream());
    out.println("md5list=" + sNumbers);
    out.close();
    BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
    String inputLine;
    while ((inputLine = in.readLine()) != null){
      // read in the HTML page result for later parsing?
    in.close();

  • Webkit. How to connect external javascript from dir C:

    I can't execute javascript from dir C:
    I have some html, that I load in Webkit with loadContent(). In that html invoked function test(). Function contains in a separate javascript file.
    <head>     
    <script language='javascript' type='text/javascript' src="file:///C:/temp/test.js"></script>
    <script>
         function getText() { var val = document.getElementById('text_area').value;
              prompt('getText', "val");
    </script>          
    </head>
    <body>
           <textarea id='text_area' name='text_area' style="width:100%; height:100%"></textarea>     
           <script> test(); </script>
    </body>External javascript (test.js)
    function test() {
            alert('It works!');
         getText();           
    }External js doesn't work. PromptHandler (AlertHandler) doesn't catch anything. If I use wEngine.executeScript('test'), appear error: netscape.javascript.JSException: ReferenceError: Can't find variable: getText.
    But that code works on any other browsers.

    Thank you for the problem report!
    This looks like a bug in WebView. A Jira issue has been filed to track this: http://javafx-jira.kenai.com/browse/RT-17330. Note that the issue may end up classified as not-a-bug because the ability to run local scripts from dynamic contents may be considered a security hole.
    As a workaround, try saving your HTML into a temporary file and load it using WebEngine.load(). It should work as in any other browser. Another option is to include all necessary code in the HTML document loaded with WebEngine.loadContent(), but I gather that is undesirable in your case.
    Edited by: 890759 on Oct 11, 2011 5:19 AM
    Edited by: 890759 on Oct 11, 2011 5:21 AM

  • How to execute the InDesign Javascript from outside in MAC

    Hi All,
    I need to execute the InDesign Javascript from outside in MAC machine.
    Anyone can help me.
    Thanks in advance.
    Regards,
    Ramkumar

    If you just want to imitate double clicking a file, use execute() method, e.g.:
    var myJavaScriptFile = new File("~/Desktop/Test.jsx");
    myJavaScriptFile.execute();
    At the top of your .jsx file type #target indesign to make the script run in InDesign.
    And I want to add to what Harbs said in the previous post: when you use do script command, you can also send parameters and get back values. See DoScriptParameters and DoScriptReturnValues sample scripts from InDesign CS3 Guide Scripts for details.

  • Runtime Error When executing Method from JavaScript

    Greetings In the name of the creator of all things, space, and time. I have a problem with scripting an applet using Javascript (JScript). The problem is as follows: I receive the runtime error - An outgoing call cannot be made since the application is dispatching an input-synchronous call.
    I invoke the applet from a JavaScript from within a web page. The applet populates and display a JTable. From the Table I select an element in a row and press a button which kicks off another page. From within the page I called one of the applet's method i.e. _applet.cfquery(window, hastable).
    This method connects to a data source and returns some data. When the method is invoked I receive the runtime error.
    What is the problem and How do I resolve it? Note: The same code works with Netscape 7.0 with out any problems.
    Particulars:
    Browser: Internet Explorer 6.0 - Version 6.0.2800.1106C (SP1)
    Operating System : Windows 2000 (Service Pack 3)
    Scripting Interface: LiveConnect.
    Scripting Version: JavaScript (1.5)
    I know Microsoft Uses ActiveX to support embedded object. I recently came up on the JavaScript Object
    ActiveXObject(appname.className [,remoteServiceName]). Could I use it to access my applet and how would I specify the name of my applet's? What do they mean by class name. Please help me I have searched the Internet until my eyes almost fall out by I have not found any solutions.

    If the javascript to invoke applet.cfquery(window, hastable) happens automatically (onload,...), try adding a button to your page and using that to invoke applet.cfquery(window, hastable). See if waiting until the applet loads and settles down makes a difference.

  • "Rough" GIF export from ActionScript 3 files impossible?

    Hello,
    I just upgraded from Flash CS3 to Flash CS5, and I've been playing with the various new features. However, I've just encountered an odd problem that I can't seem to find a solution to.
    In the past, I've made animated GIFs in CS3 by exporting them with the "Smooth" box unchecked. This was really convenient for me because not only could I export crisp pixel bitmaps from Flash, but I could edit it in another program later. I was planning on making some GIF animations via this process with the aid of the bone tool in CS4 and 5.
    When I tried exporting frames of of a figure created with the bone tool in CS5, however, I got images that were fuzzy and often had distorted colors. After some time, I realized that this was because in CS3, I had exported the images from ActionScript 2 files, while the bone tool only works in ActionScript 3 files.
    Is it not possible to export "rough" GIFs from ActionScript 3 files, or is there a trick to doing that that I'm somehow missing?

    I'm sorry for not making it clear in my initial post, but it doesn't matter whether I create an image using the bone tool or not -- any GIF image exported from an AS3 file always has an antialiased appearance, even when the Smooth box is unchecked.
    To show you what I mean, here's a simple GIF image I exported from an AS2 file:
    Notice that all of the lines are simple and pixellated, with no antialiasing at all. This is the kind of GIF I want to export from an AS3 file.
    Now here's the exact same image I exported from an AS3 file, with the exact same export settings:
    As you can see, all of the lines look smoothed, even though I made sure the Smooth box was unchecked.
    Is there anything I can do to correct this problem?

  • Using Adobe Acrobat - Is it possible to execute JavaScript to report to LMS to track pdf was viewed?

    Question:  Using Adobe Acrobat - Is it possible to execute JavaScript to report to LMS to track pdf was viewed?
    What I would like to do is to create a pdf with an Acknowledgement button that when click will report (via JavaScript) to the LMS (Learning Management System) that the end user viewed/acknowledged the pdf.
    Can this be down with JavaScript in this fashion?

    Thanks, (My fault, as I should have specified this.) Due to legacy reasons I need to use ie, and so I can't use the PrintPdf firefox plugin. So from reading the rest of that thread, the best method does seem to be to get hold of a copy of acrobat, and add a Print() script in each file, and open it in a new tab.
    At least it gives me somethigin to try anyway :-)

  • Want to trigger an event in Javascript using Actionscript

    Hello forum,
    I am trying to trigger an event in Javascript from an SWF.  In HTML the triggering event is this:
    <a href="#" onclick="return GB_showFullScreenSet(page_setWEB1, 1)"><img src="images/Thumbnails/IMAGE-NAME.jpg" /><br />Link Label</a>
    This line trggers a pop-up style portfolio image slideshow.  I am trying to figure out how to trigger this event from actionscript.  I am not sure what this would even be called so any help would be great.
    Thanks,
    Brett

    The communication works both ways.  Here's the description from that page.
    "From ActionScript, you can call any JavaScript function on the HTML page. It passes any number of arguments of any data type, and receives a return value from the call.
    From JavaScript on the HTML page, you can call an ActionScript function in Flash Player. The ActionScript function can return a value. JavaScript receives it immediately as the return value of the call."
    It can be a bit confusing to implement, so you might want to search for other examples/tutorials if you can't get it working from the one linked already.

  • Execute Javascript on EXE

    Hello,
    I've  published a SCORM compliant project from Captivate 4 as Flash(swf) now using the same project I am trying to publish it as a stand alone(exe) project but having problems with Captivate's "Execute Javascript". I am trying to call a function which is basically located within the output HTML file but since my intended output is a exe file, I am bound not to use the said action from Captivate prompted error was: "Internet Explorer cannod download. Unspecified error".Is there any way to avoid this?
    Is there any similar procedure I can work with for projects intended to be publish as stand alone?Or am I just missing something.
    Thanks
    -Miguel

    Hi Miguel,
    At a very basic level, AIR is a local web browser... meaning it can render and display LOCAL .htm pages and execute JavaScript... just like IE, FF, or Chrome will do for content fed from a server.  This means that you publish your Cp project as a web project, then tell AIR where the local .htm file exists on your hard drive.  AIR will then display your Captivate .htm file as if it was in a browser... allowing your JavaScript functions to execute.  I have developed a Captivate AIR player for other clients of mine and there are a few things to keep in mind.
    1.  Adobe AIR requires the AIR runtime to be installed on the end users machine
    2.  If you have any .f4v or .flv video files targeted for "progressive download" in your project, you'll have to adjust your Flash Security settings in order to get these to play properly.  If you don't have any of these video files... you're good to go!
    3.  If you don't have Adobe FlashBuilder, you can use the free FlashDevelop program to build your AIR project.  It takes a bit to set up your development environment, but it's free.
    If you're interested in the Captivate AIR player, please PM me.
    Jim Leichliter

  • Captivate 3 Published file won't execute JavaScript

    Pulbished Captivate 3 course.   Final screen has an exit button with the following script:  ab_SetScoreStatus(100,'completed');ab_CloseWindow();       When I post the course to our LMS it uploads fine, but when I try and run the course I get an error when I click on the Exit button and it doesn't do anything.   I had someone try the same thing on their computer and it works fine for them so I'm thinking it's something with my settings.   This used to work for me but then I got a new computer so not sure if the settings (IE, Flash or ????) are different or what.   I'm running Flash 10, and IE 8.   Any help would be greatly appreciated.  Thank you.

    Good morning Rick, and thank you for trying to help.
    Sheri Delaney
    From: Captiv8r [email protected]
    Sent: Wednesday, February 16, 2011 3:59 PM
    To: Delaney, Sheri
    Subject: Captivate 3 Published file won't execute JavaScript
    Welcome to our community
    See if the following links help.
    http://forums.adobe.com/thread/473021#5
    http://forums.adobe.com/thread/473021#10
    Cheers... Rick
    http://www.robowizard.com/pc.gif
    Helpful and Handy Links
    http://www.Adobe.com/cfusion/mmform/index.cfm?name=wishform&product=5
    http://www.ShowMeSolutions.biz
    http://sorcererstone.wordpress.com/
    http://www.gooberguides.com

Maybe you are looking for

  • Registered plsql callback not notified

    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 Production system: Two-instance RAC Testing system: Single instance I have a PL/SQL procedure registered through DBMS_AQ.REGISTER to be notified when messages come in on a particular queue. Wh

  • Problem with 'SAPGUI_PROGRESS_INDICATOR' in SAP GUI 7.10

    Hi! We have a problem with SAP GUI 7.10 PL 11. When running this little code snipet, the SAP GUI crashes and SM21 mentions a broken pipe while calling writev in niuxi.c DATA: lv_i type i,       lv_string type string. DO 50000 TIMES. lv_i = lv_i + 1.

  • Target structure generation using GUI mapping

    Hi Experts, I have two nodes in source  and one node in target structure . Source permanentemployee (0..n)       name       dept contract employee (0..n)      name      dept Target Employee (0..n)     name     dept If both nodes (permanentemployee  &

  • How do I submit my e book to the i book store

    How do I submit my e-pub book to the i store and get approved as quickly as possible?

  • C55-B5100 boot problem

    I've had a C55-B5100 for about a month or so and recently tried to boot from an external usb hard drive with LInux Zorin installed on it. No matter what I do, I cannot get the laptop to boot into the OS. I hit F12 and select usb as my boot device and