Using external javascript functions

So I have a couple of scripts that I use to create a 360 image rotation and an auto rotate on page load that I use before animating them in Edge Animate.  Here's an example of what I mean. the 360 rotation is just cycling through a series of images to create a rotating effect every certain number of pixels the mouse is dragged. To make the autoplay, I use an extended version of jquery-ui to simulate a mouseclick and drag.
Now this works well without bringing in the html into Edge Animate, but what I want to do is to be able to enable the autoplay after animating an image in Edge. So the call to start the autoplay is this.
<script>
$('#product').simulate("drag-n-drop", {dx: 300, interpolation: {stepWidth: 10, stepDelay: 50}});
</script>
So with the javascript libraries in referenced in my html already, would I right in saying that all I would have to do is add that script as a trigger on my timeline?

Load all the script files using the script loading option in Edge Animate
Than if the are using the right query element ,i think the above code should work

Similar Messages

  • How to make use of javascript functionality in WD application?

    hi,
    I want to use some javascript functionality in my web dynpro application.
    This is my requirement:
    I want to design templates for User's ID card.
    For that , I need to use label, image area, headings in that template as drag and drop objects(so that we can move the lable, image fields whereas we want in that template area).
    We have already done this scenario by using javascript.
    How could it be possible in web dynpro?
    Can I use the existing javascript in my WD application?
    Anyone Pls suggest me.
    Thanks.

    hi Abdul,
    in addition you could read documentation on the popupmenu, you can find here:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/de/416d42ab7fd142e10000000a1550b0/frameset.htm
    BTW: This only works for NW2004s (-;
    Kind regards
    Stefanie

  • Captivate_DoExternalInterface - Has anyone used this JavaScript function?

    I noticed in the SCORM_utilities.js file there was a function named:
    function Captivate_DoExternalInterface() {
    Has anyone tried to use this JavaScript function from inside a course, such as to update the value for the current "bookmark" of where the student is in the course?

    Yes, I've seen various posts over the years with folks who use that to make specific LMS calls.
    It can be done...
    Here for example, though a bit old:
    Google Groups
    Search the web for that function and I'm sure you'll find at least a few examples...

  • Having problem with calling external javascript functions in LV

    Hi,
    I found this VI: http://lavag.org/topic/10304-discuss-calling-external-javascript/, which I believe can be really helpful for my work. The problem is I can't get it to run based on the following problem:
     - Apparently the "ScriptControl" cannot be loaded
    I am using LabView 8.6, and this vi has been produced in a 8.0 version. Do you think this is the problem? If not, what could cause this problem running this VI?
    Thanks,
    Diogo

    Hi,
    To start I am using this examplo from the google code page.
    <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
        <title>Google Maps JavaScript API Example</title>
        <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=abcdefg&sensor=true_or_false"
                type="text/javascript"></script>
        <script type="text/javascript">
        function initialize() {
          if (GBrowserIsCompatible()) {
            var map = new GMap2(document.getElementById("map_canvas"));
            map.setCenter(new GLatLng(37.4419, -122.1419), 13);
            map.setUIToDefault();
        </script>
      </head>
      <body onload="initialize()" onunload="GUnload()">
        <div id="map_canvas" style="width: 500px; height: 300px"></div>
      </body>
    </html>  
    It loads a basic map, and is saved in a html file created for example in Notepad. Basically as I said the VI is very simple, see next image.
    But like I said, this strategy does not allow labview to interface dinamically with the javasscript code in the html file. Doing it this way, I would have to constantly update the code in the file with new coordinates and loading the map again. This causes the mentioned flickering problem that I also had with static maps.
    Diogo

  • Using a JavaScript function as a listener

    Problem with the original Java plug-in system. Most all my customers are forced to use the original Java plug-in (not the Next-Gen). So, I need a solution that works for the original please.
    JavaScript:
    applet.addActionListener({
        actionPerformed: function(evt) {
            alert("Heard the event!\n" + evt.toString());
    Java Applet (snippet):
    private JButton pushButton;
    public void addActionListener(final JSObject jsl) {
        // Wrap the JSObject in an ActionListener.
        ActionListener l = new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                jsl.call("actionPerformed", new Object[] { evt });
        // Add the JS listener to the button so it gets informed of clicks.
        pushButton.addActionListener(l);
    }This works fine if I could use the Next-Gen plug-in, but as I mentioned earlier, I am prohibited from using that.
    Oddly enough, this code seems to work in IE, but it fails in Firefox. In Firefox while the JSObject itself is not equal to null, calling "toString()" on it returns "null". Thus, the call to "call(...)" does nothing and the JS function is never called.
    In IE, it may be necessary to use a full-fledged class to store the reference to the JSObject. The "final" keyword should preserve it, but sometimes it doesn't.
    public class JSActionListener implements ActionListener {
        private final JSObject jsObj;
        public JSActionListener(JSObject jsObj) {
            this.jsObj = jsObj;
        public void actionPerformed(ActionEvent evt) {
            jsObj.call("actionPerformed", new Object[] { evt });
    public void addActionListener(final JSObject jsl) {
        // Wrap the JSObject in an ActionListener.
        ActionListener l = new JSActionListener(jsl);
        // Add the JS listener to the button so it gets informed of clicks.
        pushButton.addActionListener(l);
    }

    I'm such a moron. I never put in a trace command to see if
    the last line of my shrink command was getting executed. It turns
    out the movie doesn't scale perfectly to 16.5 but instead goes to
    16.49etcetc. As a result that last line wasn't being executed. Now
    everything works. But I was wondering if you guys could think of a
    nice way to compartmentalize all of this code, like maybe store it
    all in a variable or something, so I can attach it to several
    different movie clips?

  • Hello, My web site is using the javascript function transformDocument but it looks like it doesn't working in version 6

    Hello,
    My we site is using a lot of ajax, and I have a function transformDocument that it doesn't works in version 6.
    Please help!!!

    Thanks a lot!!

  • Use external Javascript to control native PDF zoom

    This is my first time posting and I am unsure if this is the right place to post.
    I have an embedded pdf that I would like to turn off the toolbar on. The only downside is that I don't want to count on people knowing ways around not having the buttons. I already have a zoom in and zoom out button elsewhere on the page. See Image. The reason I would like to use the external buttons vs the ones on the pdf, is that I will also link to non-PDF images that I use the zoom buttons for. Is there any way to access the native adobe reader zoom features through external code?

    If the PDF file is embedded in a frameset you can do this via Browser JS.  There used to be an example in the Acrobat SDK so you might want to start there. 
    Here is a link to the area in the SDK that you want to use and the method I believe you would want to work with is "setZoom".
    http://livedocs.adobe.com/acrobat_sdk/10/Acrobat10_HTMLHelp/wwhelp/wwhimpl/common/html/wwh elp.htm?context=Acrobat10_SDK_HTMLHelp&file=IAC_API_OLE_Objects.103.2.html#1522054
    SetZoom
    Sets the magnification according to the specified value.
    Syntax
    void setZoom(FLOAT percent);
    Parameters
    percent
    The desired zoom factor, expressed as a percentage. For example, 1.0 represents a magnification of 100%.
    Related methods
    AcroPDF.SetZoomScroll

  • Developing site to use external javascript files for server access. my ain.js file just displays and does not execute. Why?

    My ain.js file is meant to work on and access server files for tracking all visitors to the site I am developing.
    One way to access it, in my plan, is to use index.htm. when I open index.htm it displays correctly and presents a link to ain.js with a query line (?a=zzzzz--e2).
    The entire file is displayed; but not executed.
    Short of building my own server (prior to publishing what I am developing) how do you propose I test what I have written?
    As a retiree, I have limited funds (the purpose of developing a website is meant to coorect that).

    This forum is for Firefox user support, very few of our contributors are developers.
    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum.

  • Set Presentation variable using external Javascript?

    I want to create a user defined filter using custom java-script drop-down and wish to set a presentation variable on the dashboard. I have looked into various JS files to find the method for setting a presentation variable but have failed badly. If there is a way to set this variable please do help me out.
    thanks in advance
    ~V
    Edited by: user4555163 on Mar 9, 2011 5:42 PM

    Provide js-library you found and method for setting pres. variables and your custom js code.

  • Using browser javascript to copy selected text from a pdf file opened in Air app.

    I have posted this question on reader forum as well, but I think it is more suited here...
    I am trying to create a note-taking application in air. I want to extract selected text from pdf file as a string object or to the clipboard.
    Obviously, all pdfs in my local storage will not be scripted to recieve postMessages and act accordingly, and that is not practical either. So, my problem is, how can I copy the selected text in the pdf file (opened as an object in htmlloader within my Air app) to clipboard or directly in another control by say clicking a button in air application? I suppose, this is possible using javascript, however, I don't know which reader methods are exposed to the wrapper htmlloader control. In short, I want to execute app.execMenuItem("Copy") command through htmlloader javascript. Any alternate solutions are also welcome.
    This is similar to passing inbuilt commands/methods/functions (of adobe reader) to pdf-reader plugin embedded in a webpage via javascript. This is possible in IE where the pdf is rendered as activex object, and hence JSObject interface of pdf document/reader is accessible to the browser javascript. I have also read that this same JSObject is accessible to VB as interface for IAC, so as the Air is Adobe's own product, I was wondering if equivalent of JSObject is accessible to htmlloader control as well.
    Thanks in advance...
    Mits

    Thank you Thom for your reply...
    from
    http://www.adobe.com/devnet/acrobat/javascript.html
    ...Through JavaScript extensions, the viewer application and its plug-ins expose much of their functionality to document authors, form designers, and plug-in developers...
    As it is explicitly mentioned, that the functionality of adobe reader are exposed for plugin development, I thought someone here might have used external javascript to execute some safe methods in adobe reader. The functionality (i.e. external javascript interface-JSObject) is already available for VB programmers to develop IAC. Further, the Acrobat SDK example called "AcroPDFinHML" shows how one can embed a pdf-reader in a html page and execute some safe methods (like gotonextpage(), zooming etc.) in IE as ActiveX plugin. I have checked it myself for adobe reader 9, and it works perfectly, so there is no security issue as such to implement the same for another browser (like in my case, the htmlloader control in flex/air app).
    I intend to create a note taking application in air, where it is very much required that I should be able to copy selected text from various pdf documents, that are open in my app, and subsequently paste/collect/save the collected notes and process them afterwords (offcourse, from the pdfs that allow me copying text). However, it is not happening for me here. As the pdfs are opened through adobe reader plugin, it does not register the copy command executed by my air app. It registers the system level copy command (by keyboard shortcut Ctrl+C), but my air app has no way to execute the system level copy command programmatically. So I am kind of stuck here...
    Thanks again for your reply. Having known what am I intend to accomplish, any other (may be alternative) solutions will be appreciated nonetheless...
    Mits

  • Calling javascript functions from xsl on mac safari

    Hi,
    I am having a problem calling external javascript functions from xsl on mac safari, i am trying to generate a dropdown dynamically from an xsl document using XSLTProcessor through javascript, following is the code snippet of the xsl document
    <select name="ddl_EmailSubType" class="Menu" onclick="onEmailSubTypeChange();" id="ddl_EmailSubType" >
    <xsl:for-each select="./SubTypeFields/FieldGroup">
    <xsl:if test="@SubTypeGroup != 'All'">
    <option>
    <xsl:attribute name="value">
    <xsl:value-of select="@SubTypeGroup"/>
    </xsl:attribute>
    <xsl:if test="@SubTypeGroup = $SelectedSubContentType">
    <xsl:attribute name="selected">selected</xsl:attribute>
    </xsl:if>
    <xsl:value-of select="@SubTypeGroup"/>
    </option>
    </xsl:if>
    </xsl:for-each>
    </select>
    here the function onEmailSubTypeChange() is present in an external js file, all the other functions from this files are executed successfully except the ones which are defined in the xsl document.
    I have also tried replacing onclick="onEmailSubTypeChange();" with onclick="javascript:alert('hello world');" but the event is not getting fired at all since i cannot see any alert on the selected item change of the dropdown.
    Is there a way in which i can achieve this ?
    any helps appreciated.
    Thanks in advance
    Vikas Mestry.

    Hi,
    you can use this example VI
    Regards,
    Aurélien J.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Du 30 juin au 25 août, embarquez pour 2 mois de vidéo-t'chat ! Prenez place pour un voyage au coe...
    Attachments:
    browser gps.vi ‏23 KB

  • Including external javascript and css files in servlet

    Hello,
    I am struggling to generate an HTML page from within a servlet using external javascript and css files. I am not sure how to point the servlet to the external files.
    Any code sample to accomplish the above will be much appreciated.
    Thanks inadvance,
    Antana.

    Can't you just include the following in your servlet?
           response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Getting CSS</title>");
            out.println("<link rel='stylesheet' type='text/css' href='yourCSS.css' />");
            out.println("<script language='JavaScript' SRC='yourScript.js'></script>");
            out.println("</head>");
           //...

  • Using a javscript function in a jsp embedded in another jsp

    Hi All,
    I have 2 jsp's say, a.jsp and b.jsp. I am using the b.jsp in a.jsp using the
    <jsp:include page="b.jsp" /> in a.jsp
    Now i am having a javascript function test() in a.jsp. Can i use this javascript function in b.jsp also. I just want the output of this function to be used in b.jsp also. So is there a way i can use it or should i write the function again in b.jsp?
    Thanks in advance!!!!!!

    Javascript only intercepts on the generated HTML output at the client side, not on the server side JSP code. If the function is there in the HTML output, you can just use it.

  • JavaScript functions in ADFLib - jdev 11.1.2.3

    Hello:
    I would like to create an ADF Library that has many JavaScript functions and any application that adds this ADF Library to its project should be able to use the javascript functions.
    Or is there a better way to accomplish this?
    I'm following the Enterprise Structure of creating ADFLibs for : Common Code, Common Model, Common UI
    Subsystems then import these ADFLibs
    The Master app, imports the ADFLibs and the Subsystems and uses subsystem taskflows in the Master to complete the application.
    In my case, I would like to execute the same JavaScript in both the Subsystem and the Master. So I think I should put the JavaScript in the Common UI adflibrary or what???
    What is the best way to structure this to be able to reuse the Javascript in multiple apps?
    Is there any articles/samples that you can reference?
    Thanks for the help.

    Thanks...
    I have watched this video. It was very helpful but not seemingly enough for this issue.
    My first try was to put the JavaScript in the CommonUI, but then I could not figure out how to reference it in the adflib as the JavaScript library is relative to the context path. So I still have not figured this out yet.
    Thanks for the help.

  • Calling javascript function with pressing button

    Hello,
    I would like to enable an item on my page wihic is disabled before.
    I should use a javascript function.
    I wrote in the page HTML Header:
    <script language="JavaScript1.1" type="text/javascript">
    function enFormItems(item1){
    enItem = document.getElementById(item1);
    enItem.style.background = 'white';
    enItem.enabled = true;
    </script>
    I would like to call this funtion when i press a button.
    How can i do that? It is possible?
    Thank You

    Zoltan,
    Have the button redirect to a url and enter the following for the url:
    javascript:enFormItems('PXX_ITEM_NAME');Regards,
    Dan
    http://danielmcghan.us/
    http://sourceforge.net/projects/tapigen/

Maybe you are looking for

  • WL 6.1 to 8.1 XSL Error SAX Exception, Could not parse xsl document

    1)I have an application which is deployed and running successfully on WL6.1. The application uses lot of xsl style sheets. Parsers used were from xalan.jar and xerces.jar 2)Now, I am migrating it to WL8.1, the application is deployed on 8.1 but when

  • How to use frames in a jsf page

    hi all, I need my page to be divided into three frames each frame with scrollable option. Each page should be able to display different jsp pages.Can anyone give a solution how can i implement this in a jsf page regards, Prasant

  • Macbook starts up with quicktime running...won't close.

    My macbook is booting up with quicktime and safari running and won't allow me to open any applications or allow me to shut down. I have to re-boot several times before it finally cooperates. It goes into this mode whenever I try to open a video file

  • DAC not able to connect to Informatica services

    Hi All, I have an issue in connecting DAC with Informatica. In this scenario Informatica Server and DAC server in installed in Linux machine and Informatica Client and DAC client in Windows. I have given all configurations required. But DAC not able

  • How does the adapter specific parameters gets filled up?

    Hello, How do I check adapter specific parameters? like, I am making the Soap action parameter to dynamically fill in the receiver soap adapter. I want to check if the correct (one of the 4 actions) action was filled in action field how do I check? t