Including javascript dependencies issues in EB2.1

Hi all,
I have an issue with an extension. I am calling a jsx file from an extension*. I do that for a long time ago woithout issues. I now tried to include "jsinc" files in my main jsx file. I set an include path related to a url of mine ( "/Users/… ). I thought EB would del with that and do its own cooking but fact is, it doesn't. When compiled, extension works fine at my place but doesn't in different computers than mine. I suspect the absolute url is the cause of my troubles. But using relative urls don't seem to work neither.
What is the proper way to achieve an inclusion of external js files ?
TIA,
Loic
PS:
Here is my pattern :
Using a class declaration :
[ Embed (source="Javascript/JSXAPI.jsx" , mimeType=  "application/octet-stream" )]
and then in my jsxfile :
#includepath '/Users/sunsikim/Documents/Scripting/Extensions/ExtensionV2/src/Javascript/'
#include 'DateUtilities.jsinc';
#include 'Utils.jsinc';
#include 'PrefsUtils.jsinc';
//my code…
*using : http://cookbooks.adobe.com/post_Communicating_between_JavaScript_and_the_Creative-17383.ht ml

Hi MLavie,
Given your scripts within the src folder :
Source Main Code : JSX1.jsx
#include "JSX2.jsx"
function action1() {
action2();
Now you need a third script JSX_BIN.jsx
but first compile as binary your JSX1.jsx script.
Once that done copy/paste the jsxbin string
eval(your JSX1.jsx script as binary goes here);
Then you embed the JSX_BIN.jsx script.
[Embed(source="JSX_BIN.jsx", mimeType= "application/octet-stream" )]
  private static var _jsx1ProxyClass:Class; 
  private static var _jsx1Interface:HostObject;
And call it as you did :
public function performJsx()
   _jsx1Interface = HostObject.getRoot(HostObject.extensions[0]);
   _jsx1Interface.eval(new _jsx1ProxyClass().toString());
   _jsx1Interface.action1();
And yes, as many changes you do in the source JSX1 file, you need to recompile and copy/paste in the JSX_BIN.jsx script.
Hope that helps,
Loic

Similar Messages

  • "Error: the xajax Javascript file could not be included. Perhaps the URL is incorrect? URL: /includes/javascript/xajax_js/xajax.js". other posters with a xajax error on this board got the response to go look for developer resources. (i'm not a developer)

    I'm on a mac running 10.6.8, was using Firefox 6.02 when the problem started, i performed a clean install of 7.01, installed the latest Flashplayer, and reinstalled java (the 10.6.5 update file from apple's site).
    I seem able to load video at youtube.com, and was able to load web-based irc chatrooms at ircchat.tv. however, at jamplay.com a paid member site, all of the lessons are flash video, and there's a live video feed chat room that is also flash based, and I am not able to view this content. the video content pops up the error message "Error: the xajax Javascript file could not be included. Perhaps the URL is incorrect?
    URL: /includes/javascript/xajax_js/xajax.js" and the clicking on the "launch chatroom" button does exactly nothing.
    I have contacted the jamplay site team but their recommendations are the steps I have already taken, mentioned above, that did not resolve the issue.
    some links to content on their site visible without being a member:
    http://www.jamplay.com/
    this one has a flash interface that, if things were working, would have a video in the center and members and staff talking abouth that area of the site when you click on one of the title buttons. Now that I am having this problem, nothing is clickable and there's no indication that there should be a video in the center. The error message regarding xajax does not come up at all.
    http://www.jamplay.com/guitar-lessons/beginners/1/527-16-circle-of-fifths
    same thing. video content is missing, xajax error does not appear.
    http://www.jamplay.com/live
    when I load these all content except the video loads on the page. this page does not give me the error at all, just does not load the video
    I can't seem to recreate the actual error without being logged in as a member of the site.
    The apple support team gave me a one-time free suppport ticket to troubleshoot an ethernet issue I was having. Unfortunately, the databases I removed were not deemed either by apple or me to be noteworthy or necessary to retain (all of them were for software I not longer have or use). I don't know which plist file might have been the one I need now. I did reinstall the java and flash items. The only other item that I think it might be is a set of belkin router software that I uninstalled because i'm not using any belkin hardware anymore.
    If someone has any kind of idea I would be most appreciative.

    That's a comment in the file. It has no effect at all.

  • How to include vi dependencies in application builder?

    I have a small project in which I am trying to build an application.  I am having issues with the build including all dependencies.  In the project explorer "Items" tab, there are 7 files listed (1 dll and 6 vi's).  When I build the application, and try to run it on a different computer, it says it cannot find the dll and 3 of the 6 vi's.  Under "Source Files" for the build specifications, the only .vi I'm able to add is the main/startup vi.  It does not give me the option to add any of the vi's/dll that are listed as dependencies in the project explorer list.  Under "Source File Settings", when I click on dependencies, I have "Set destination for all contained items" checked and "Support Directory" selected.
    Any thoughts as to what I'm missing?
    Thanks,
    Jordan
    Attachments:
    ProjectExplorer.jpg ‏49 KB
    SourceFiles.jpg ‏51 KB
    SourceFileSettings.jpg ‏64 KB

    NeilR, let me know if this works for you.  
    Edited to add:  As I already pointed out, this isn't the cleanest code.  Especially some of the stuff more recently added.  It's pretty messy!
    Attachments:
    LabJackAnalogINwGPS142.zip ‏374 KB

  • JavaScript help Including JavaScript in a .js File Referenced by the Page

    I need help with JavaScript. I have been doing the Advanced Tutorial, and still don't feel that understand how to make it work.
    The example in "Oracle Database Application Express User's Guide" shows this line:
    <script src="http://myserver.myport/my_images/custom.js" type="text/javascript"></script>
    I understand that "my_images" is hypothetical, but where is the real equivalent to this?
    Is there a working example/tutorial of Including JavaScript?
    <li />Also how does one create AJAX functionality?
    If I want to do something like this http://www.w3schools.com/ajax/ajax_server.asp
    in APEX, where do I place the "time.asp" script?
    <li />Can we assume that the HTML and ASP file are in the same directory?
    Please any assistance with these topics are greatly appreciated.

    Hello,
    >> what is the directory structure you would use for /my_images/custom.js? Where does one load these .js files? where is it in the local machine?
    C:\oracle\product\10.2.0\db\Apache ?
    The documentation only gives you a possible example (and I might agree that it’s not the best one). You should put your external JS files (on the server OS file system) wherever it will be most accessible and maintainable for you. The best place, IMHO, is under the /images/javascript/ directory. The reason is very simple. You can use the alias /i/, which defined in your DAD file, to gain a very simple path to the file. In this case, the loading statement will look similar to the following:
    <script src="/i/javascript/custom.js" type="text/javascript"></script>
    >> Do you mean "Oracle Database PL/SQL Packages/Types and htp packages?"
    I’m assuming you are talking about the on-demand process. This is a regular PL/SQL anonymous block, which will be fired only upon specific request - http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/bldr.htm#BABEAIIE . This is the mechanism for handling the server side of AJAX.
    >>Anythig else available for us to levarage?
    Denes examples site can also be a valuable resource - http://htmldb.oracle.com/pls/otn/f?p=31517:1 .
    Regards,
    Arie.

  • How to include JavaScript in a list instance's form in Visual Studio

    So I know you can use JSLink to include JavaScript files in list definitions in Schema.<g class="gr_ gr_8 gr-alert gr_spell ContextualSpelling ins-del multiReplace" data-gr-id="8" id="8">xml</g> like so:
    <Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" JSLink="~site/SiteAssets/Scripts/jquery-1.11.1.min.js" />
    But how can I do this with a list instance that I'm provisioning that's based on the tasks list definition? Is there somewhere I can include JSLink in the instance's Elements.xml?

    If you would have your own custom list definition, you could deploy a custom form for your list instance, and set the JSLink element of the Form. You cannot set it "globally" for the list, only per form.
    If your list instance is based on a built-in list instance (like Tasks in your case) you should set the JSLink property from code. If you would like to deploy the list instance and set the JSLink property from a .wsp package, you should lookup the list form
    and set this property from a feature receiver. If you already created / deployed the list instance, the simplest method is to set the property via PowerShell. See the code samples for PowerShell and C# in this thread.

  • How to include javascript in Edge?

    I am new to jQuery and Edge.
    I want to add some "Drag" functions to my project and I browsed the forum and found a javascript plugin. So I downloaded the js files and placed them in my project folder (the folder containing .an and .html)
    I searched the forum and found a way to include javascript which is adding the following code in compositonReady event
    $("<script type='text/javascript' charset='utf-8' src='myjs.js'>").appendTo("#Stage");
    and I replaced "myjs.js" with the plugin file name but it seems not working. When I view the html code there is only "MyProject_edgePreload.js" in it. Thanks for guiding me what's wrong here.

    Better tools are available: yepnope() and $.getScript().
    1) About yepnope(): you can download samples file here.
    2) $.getScript() is a jQuery function :  $.getScript("js fileName", function(){ your code });

  • [svn:fx-trunk] 15795: Initial check-in for removing unused rsls and the include-inheritance-dependencies-only features .

    Revision: 15795
    Revision: 15795
    Author:   [email protected]
    Date:     2010-04-28 14:01:58 -0700 (Wed, 28 Apr 2010)
    Log Message:
    Initial check-in for removing unused rsls and the include-inheritance-dependencies-only features.
    Changes to implement ?\226?\128?\147remove-unused-rsls feature. When the configuration option is true, RSLs associated with RSLs that are not used by the application are not loaded at runtime. The compiler logs the primary RSLs that are required with the number of failovers, if any.
    compiler/src/java/flex2/compiler/common/Configuration.java
                add ?\226?\128?\147remove-unused-rsls and ?\226?\128?\147include-inheritance-dependencies-only.
    compiler/src/java/flex2/compiler/CompilerSwcContext.java
                pass rslGroup to getSwcGroup.
    compiler/src/java/flex2/compiler/swc/SwcCache.java
                Add parameter to getSwcGroup to a group of rsls can be passed in.
    compiler/src/java/flex2/compiler/swc/SwcGroup.java
                Add a SwcGroup constructor that accepts a SwcGroup of Rsls. Use the RSLs to give preference to scripts that come from RSLs when duplicate scripts are merged.
    compiler/src/java/flex2/tools/CompcPreLink.java
    compiler/src/java/flex2/tools/PreLink.java
                Find the set of SWCs that are contributing code to the application. Use this set to restrict which RSLs are written to the generated root class. Log the RSLs that are required to give the user some feedback.
    compiler/src/java/flex2/tools_en.properties

    Ah, ok. I was in the assumption the PCI connect had something to do with the video connection. But it seems like Apple wanted to reinvented PCIe...
    I'm out of my territory here so feel free to ignore the following.
    These are the things I notice in your Xorg.0.log:
    [    19.474] (==) modesetting(G0): Depth 24, (==) framebuffer bpp 32
    [    19.474] (==) modesetting(G0): RGB weight 888
    [    19.474] (==) modesetting(G0): Default visual is TrueColor
    [    19.474] (II) modesetting(G0): ShadowFB: preferred YES, enabled YES
    [    19.500] (II) modesetting(G0): Output VGA-1-0 has no monitor section
    [    19.526] (II) modesetting(G0): EDID for output VGA-1-0
    [    19.526] (II) modesetting(G0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.
    [    19.526] (==) modesetting(G0): DPI set to (96, 96)
    What the hell is modesetting doing there?
    And have you tried the nvidia blob? It could be that this is not well supported by nouveau. Maybe check up with their IRC / mailing list.

  • Trouble including JavaScript on page

    I am having trouble including inline JavaScript on a JSF page. The code is something like this:
    <f:subview id="footer">
        <b>&#169; 2005</b> <a href="mailto:[email protected]">[email protected]</a><br />
        <b>Last Updated by:</b> <a href="mailto:[email protected]">[email protected]</a><br />
        <b>Last Modified:</b> <script type="text/javascript"><![CDATA[document.writeln(new Date(document.lastModified).toString());]]></script>
        <br />
        <b>Page Loaded at:</b> <script type="text/javascript"><![CDATA[document.write(new Date());]]></script>
        <br />If you experience any problems with this page, we would appreciate to <script type="text/javascript"><![CDATA[var href = "mailto:[email protected]?subject=Problem with webpage: " + document.title; document.writeln("<a href=" + href + ">hear about it</a> from you.");]]></script>
    </f:subview>None of these inline scripts are being run and the JavaScript console says that document.writeln/document.write is not a function!
    My Javascript functions which are defined in an external file and then linked in via the script tag seems to work fine.
    I have included the inline javascript in CDATA sections to avoid complaints about the jsp not being well formed (I'm using the JSP XML format for my pages). Is this the right approach? or could this be what is causing the problem?
    Any light anyone can give me with regards to this will be greatly appreciated.

    Hi,
    Thanks for your help. Unfortuantely that is not the problem. I do however, acknowledge your advice on doing the work on the server which seems good so I have replaced these scripts with things like
    <fmt:formatDate value="${sessionScope.rbb.lastModifiedDate}" type="both" pattern="dd/MM/yyyy, hh:mm:ss a" />which as u say is a much better solution. Anyway, I would still like to know what the problem is for future reference.
    Interestingly enough when I execute the following code:
                  var str = "";
                  for(var aProp in document)
                   str += "" + aProp + "\n";
                  alert("Properties in document...\n" + aProp);The only property I get for document is: evaluate
    Does anyone know what is happening?
    AFAIK, the correct way to include Javascript in an XHTML doc is as follows:
    <script type="text/javascript">
    <![CDATA[
    //script goes here
    ]]>
    </script>But I'm not even sure if the problem is in the way I am including the javascript anymore. Any help would be appreciated.

  • Accessing JSP variables in Included Javascript

    Hey All,
    I want to hide my javascript to be viewed on the client browser.
    I know we can do that with the javascript include ,But i am using JSP variables in
    Included javascript.I can't access those variables any more.
    Does anybody know any workarround.
    Thanx
    Vijay

    Hi Vijay,
    I am also facing the same problem of hiding javascript in the client browser. My javascript variables are getting initialised on the fly using JSP. Since JSP is compiled on the server side, one can't compile .js file on the client side.
    What u can do is to divide your page into frames with
    <frameset rows="100%,0%">. Now put your form hidden fields or the .js file in frame 2 which is not visible to the user and then assign your jsp variables in the frame2 html/jsp page. Now access your variables from frame2 in frame1 using
    var i = parent.frames[1].document.forms[0].elements[0].value
    Assuming that there is 1 form and 1 hidden field in frame2 html/jsp page.
    I hope u get the logic rite....
    I had done it for application but problem is that our users are real MORONS and they keep doing ctrl+F5 which takes them to the Indexpage.
    If you get some other solution then please mail it to my email address
    [email protected]
    Regards
    Vimlesh

  • How to include javascript and HTML in analysis output?

    Is there any document for that? Currently I set Treat Text As HTML under Data Format tab and include some simple HTML in Column formula, but I doubt it is correct way to include javascript and HTML in ayalysis output. Can anybody provide any idea or sample?
    Thanks

    Hi,
    i am not sure about javascript but yes treat text as Html is used to utilize HTML power in OBIEE.There are many examples of this.Common uses are a href,GoNav and PortalPagenav fuction.These function are mix of HTML and OBIEE.We gebrally use this option when we want to carry out some HTML operation on data rendered by OBIEE.Common example is to make data values a hyperlink for which we use a href
    See the below links for GoNav and a href
    http://108obiee.blogspot.com/2009/09/go-url-request-navigation-between.html
    Creating Hierarchies on Direct Database Requests
    You can also write java scripts here.
    Regards,
    Sandeep

  • Managing included javascripts

    Hi
    Are there any way to manage the included javascripts in Muse?
    We have a custom jquery plugin, which does not work with the jQuery muse automatically wants to include. However, if we comment it out (after exporting to html), and include a normal jquery-min.js file, it works perfectly.
    However, when we do that, there comes a popup with some muse-scripts not working.
    Including the working one in the top doesn't work, since it gets overrided in the bottom.
    Looking forward for some answers
    Regards,
    Agidon A/S

    When you bring a PRSM single device mode CX under management of PRSM in multiple device mode, the managing PRSM will discover the existing policies and give you the option to import and continue using them as-is.

  • Issue with firePartialAction or how to include JavaScript Functions

    We are using the Client Action Type: firePartialAction on an element in a region of type: TABLE. When a user enters data in here and tabs away, the action fires and recalculates 2 other fields in the same region. On a object with a small number of rows, it seems to work fine. However, when you have a large number of rows (anything over 25), the page seems to hang for nearly a minute and then when it does come back, the values are sometimes not calculated properly.
    The only reason we are using firePartialAction is because the dev guide says that JavaScript is not supported by OAF. We would much rather use a client-side JavaScript function to do these simple arithemtic operations rather than do them on the server.
    My question is two-fold:
    1 - Has anyone experienced this issue and are there any other settings or coding tricks that we should be aware of.
    2 - Has anyone ever rendered a page with a custom JavaScript tag (or library)? Also, where would you add the code in JDeveloper to get a particular element to execute a particulate javascript function (ie: onchange=MCalc())?

    The firePartialAction event is not working for us, so we need to be able to at least try out javascript. We're rendering the page from an XML file, so it's not clear to us how we would even get a custom HTML tag to render into the page at all. Normally, I'd use some kind of HttpServletResponse.getWriter()...println method call to write html (as in a controller servlet), but how would you do that using the OAWebBean? I checked the OAFromattedTextBean, would that allow me to embed onchange into the field?

  • Javascript maildoc issue with Adobe Reader 9.5

    Good morning all,
    I am trying to find a possible answer to an issue I have been given regarding the maildoc javascript we are using in one of our forms.
    We are on Windows XP, Adobe Reader 9.5 and Outlook 2010.
    We generate purchase orders within SAP and forward to out vendors, they supply confirmation information and digitally sign the document.  The completed document should then be emailed as an attachment.
    Using Adobe Reader X this process runs very smoothly but in 9.5 the email is generated but without the PDF form as an attachment.
    Has anybody else had this issue or is this known and not available until X?  I have read on a number of posts that there are possible issues with Apple and such the like but wondered whether this was also an issue on the MS platform.
    Thanks in advance.
    Ashley

    Could I then ask another question regarding this?
    Was it possible to generate the email including the PDF from Adobe Reader in version 9.5 or was this facility only available in Adobe Acrobat until the introduction of Adobe Reader X?
    Hope this makes sense as I really need to get an answer back to my boss.
    Thanks for any information in advance.
    Ashley

  • Render Dependencies Issue in JSF Remote Portlet

    Hi All,
    Am facing one issue while Rendering Dependencies (JS and CSS)
    from a Remote Page (in Consumer) which contains a JSF Portlet in Producer.
    I created a JSF Portlet and added the "home.dependencies" in Render Dependencies Path
    in producer.
    Then i created a page "Sample.page" in producer and added the created JSF portlet.
    Then in consumer I created a remote page which access the "Sample.page" in producer
    and added it to the portal.
    Then, after opening the portal in IE, on checking the view source, the dependencies
    rendered in the head section of the portal are like..
    <head>
    <link rel="stylesheet" type="text/css" href="home.css"><script src="homeJobs.js" type="text/javascript"></script>
    </head>
    But, when i am trying to render dependencies from a JSP portlet using a remote page..
    on checking the view source, then dependencies rendered in the head section of the portal
    are like..
    <head>
    <link rel="stylesheet" type="text/css" href="http://localhost:7001/SamplePortal/resource;jsessionid=v8v8PLwTjWtx5cqGLRZJ13mGDvJ0hHJ11RQdP4QnrXdd94DJbpJy!1009314001?_portlet.portalUrl=%2FSamplePortal%2Fbrowse.portal&amp;_windowLabel=Sample_page_sample_Home_page_page_5_portlet_home_1&amp;_nfpb=true&amp;_portlet.renderResource=true&amp;wsrp-urlType=resource&amp;wsrp-url=http%3A%2F%2Flocalhost%3A7001%2FBrowseJobsApp%2Fsample%2Fhome.css&amp;wsrp-requiresRewrite=true&amp;wsrp-resourceID=&amp;wsrp-preferOperation=&amp;wsrp-resourceState=&amp;wsrp-resourceCacheability=&amp;">
    <script src="http://localhost:7001/SamplePortal/resource;jsessionid=v8v8PLwTjWtx5cqGLRZJ13mGDvJ0hHJ11RQdP4QnrXdd94DJbpJy!1009314001?_portlet.portalUrl=%2FSamplePortal%2Fbrowse.portal&amp;_windowLabel=Sample_page_sample_Home_page_page_5_portlet_home_1&amp;_nfpb=true&amp;_portlet.renderResource=true&amp;wsrp-urlType=resource&amp;wsrp-url=http%3A%2F%2Flocalhost%3A7001%2FBrowseJobsApp%2Fsample%2FhomeJobs.js&amp;wsrp-requiresRewrite=true&amp;wsrp-resourceID=&amp;wsrp-preferOperation=&amp;wsrp-resourceState=&amp;wsrp-resourceCacheability=&amp;" type="text/javascript"></script>
    </head>
    I cannot get the same type of portal url for dependencies when am using a JSF portlet in
    a remote page.
    the dependencies code i have used is..
    <?xml version="1.0" encoding="UTF-8"?>
    <window
    xmlns="http://www.bea.com/servers/portal/framework/laf/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/servers/portal/framework/laf/1.0.0 laf-window-1_0_0.xsd">
    <render-dependencies>
    <html>
    <links>
    <link href="home.css" type="text/css" rel="stylesheet"/>
    </links>
    <scripts>      
    <script src="homeJobs.js" type="text/javascript"/>
    <script src="browseJobs.js" type="text/javascript"/>
    </scripts>
    </html>
    </render-dependencies>
    </window>
    Is there any configuration am missing for rendering the dependencies with
    the portal url in the head section of view source?
    Thanks in Advance,
    Senthil.
    Edited by: Senthil on Jan 9, 2012 11:16 PM

    No idea about jsptags.com's pager tag, but consider creating your own request based paging implementation.
    It is in fact simple. Add a request parameter representing the index of the first row to be displayed. Add a second parameter or less or more hardcoded setting representing the amount of rows to be displayed at once. On next, just add the one with the other. On previous just substract the one from the other. Use those parameters to obtain a sublist from the collection, or to fire a query which returns a subset of results. As you're using JSF, you may get some useful ideas out of this: [http://balusc.blogspot.com/2008/10/effective-datatable-paging-and-sorting.html].

  • Project dependencies issue

    I am having a problem locating & removing a dll dependency within my project. When the dependencies area loads I have a single dll that appears.The project lists the dll's path as dll_name.dll which confuses me because the path doesn't start with C:/ or D:/ or something which makes it hard to locate on my hard drive. Searching for the dll's callers brings up several VI's but these VI's never call the dll that is loaded into the dependencies. I'm running LabView 2010 on XP and the VI's are third party VI's used for interfacing with some hardware. If anyone knows how I can remove or locate this dll please let me know.

    Sorry for the confusion. There was one dll of interest with 2 instances/paths loading into the project. One was moved out of the dependencies area and the 3rd party VI's that are used in my program call this dll correctly. The other dll was in the dependencies area and its only caller was my main VI which does not actually call the dll, nor do any of its SubVI's. I was able to fix this by modifying the dll location in a 3rd party VI which contained all of the other 3rd party VI's. My guess was that there was a weird dependence between one of the 3rd party polymorphic VIs used in my program.
    In 8.6 I only had to include the main VI and let the project locate all other dependencies. I then built and ran the 8.6 executable and was able to correctly operate the hardware cards the software interfaces with.
    Back in 2010 after the dll dependecy issue was resolved I then had an issue with running the actual executable. Yesterday running the executable was returning an error originating from the call library node which called the dll that was giving me problems before. This issue was fixed after receiving some updated files from the vendor.
    Now I have a new problem. Upon running the executable I received a slew of errors regarding class method calling errors within the dll I was having dependency problems with earlier. Tomorrow I will install an updated software package supplied by the vendor and see if the issue can be resolved.
    I'm going to have to check out that dependency walker program, thanks for the info!

Maybe you are looking for