Create the Java script function

Hello

I try to create the following java script function to retrieve a character string:

String.prototype.left = function (findWhat)

{

try

{

var = this.search (findWhat) position;

If (position > - 1).

Return this.substr (0, position);

}

catch (e)

{

/ / alert (e.message);

}

return "";

};

var text = "myText-description";

var separator = "-";

In this example, I try to extract the word on the left before the "-" delimiter (mtText)

But I get the following error message: failed to add a property to an object sealed: left

My question is how can I create a simple js function in the Orchestrator in the following example

Thank you

Hello

You can try the code to retrieve a string from left to right below the delimiter.


searchstr();

function searchstr() {
   try{
   var str = "angela.soni"
   var pos = str.indexOf("."); // Currently this is hard coded, you can pass delimiter as an input parameter.
   if(pos>-1) {
      var substr = str.substring( 0, pos );
      System.log(substr);
   }
   else {
      System.error("Delimiter not found");
   }
  }
  catch (e) {
   System.error("Search failed: " + e);
  }
}

I hope this would help you.

Thank you!

Angela

Tags: VMware

Similar Questions

  • How to enable the Java Script function in APEX 4.2.6 running on the result of an Xquery query.

    How to take a SQL query result in the source section of an APEX "agenda of the page" field and allow this request to be formatted using XML in an HTML format for a Java Script file to perform a function on the result?

    Currently I have the following text:

    To query the DB table and format the result as HTML:

    SELECT XMLELEMENT ("UL id ="ticker01"', XMLAGG (XMLFOREST (Scroll_Mess AS LI))") "item UL' OF Web_Ticker where Mess_Id < 10 order by Mess_Id;


    That displays the following:


    < UL id = "ticker01" > < LI > HELLO < /LI > < LI > HELLO < /LI > < /UL id = "ticker01" >

    I need the output of this to be visible to a JScript function that is currently called the "head of page", but there doesn't seem to be its scope? The function works correctly if there is a list in the page field items 'Text element Pre' but does not work correctly when used in conjunction with the query to generate a table form.

    If everyone is happy to help I would be grateful .

    James.

    Solved!

    In order for the request to be part of the DOM of the page of the APEX, the Java Script allows to perform its function on the result marked "HTML" to query, you must set page of the apex on which the query resides and then add the inner text of this page to a second variable for which the function of web ticker can run on as follows:

    $(function() {})

    var x = $("#P9_TICKER_DATA");

    var y = x [0] .innerText;

    x.Append (y);

    $("UL#ticker01").liScroll ();

    });

    From there, on the Java script is able to properly see the result of the query in HTML format.

  • Call a java script function, the loading of the page while in ebiz

    Hi gurus of the OFA.
    I have a requirement for a java script to each page renders OFA function call or charges.
    That is when any OAF page load or make in Oracle e - biz, I have a java script function that should be called is possible to implement the above mentioned requirements.

    Thanks in advance...
    Sourav

    OK, I have your condition. It's one of the basis OFA classes then you can try class decompile OAPageBean. I tried yesterday, there are many interesting ways you can add JavaScript and recompile class. do the backup of old, of course. And your JavaScript will work on any page of the OFA

  • Created a Java Script but the need in Spanish

    In Adobe Standard X, I created the following Script for a dynamic buffer

    Event.Value = util.printd (a-mmm-yyyy ", new Date()");

    That would show

    January 5, 2015

    How to say the same thing but in Spanish. I want to display

    5 January-2015

    Windows 7 x 64

    Remove the options to Format selected for this field.

  • Re: Passage of the value of the Java script

    Hello

    I would like to change the value in the text field of the java script P1_PERIOD and show the alert with the value of the P1_PERIOD
    When you press the button.

    The following code, I wrote in the button display attribute - attributes

    onclick = "JavaScript:ShowAlert (P1_PERIOD); »

    Java script:
    ---------------
    < script type = "text/javascript" >
    function ShowAlert (p_val)
    {
    Alert ('You have indexed' + p_val);
    }
    < /script >

    He's back char invalid error. Where am I wrong?

    Thanks in advance.

    Dip

    The correct call would be:

    onclick="javascript:ShowAlert($x('P1_PERIOD').value);"
    

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • V21 Firefox cannot find the files if file *.htm used "style windows" path slashes to the java scripts (on Unix, hosting with apache)

    Hello. I find a strange behavior of Firefox v21. If the 'windows' path used *.htm file slashes to the java scripts (on Unix, hosting with apache). Firefox says 404, but other browsers (such as Opera, Chrome, IE10) works properly with this.

    You should use slashes in links so that they work properly in Firefox, otherwise Firefox will escape them that 5% C as you can see if you would them hover in the case of a real link (this is obviously not possible in this case).

  • Why did the Java script works on my work for Internet explore, but not for Firefox RSS feeds?

    I finished building the Web site for my girlfriend, and the rest is the RSS feed. It works just fine in IE 8, but Fire Fox 9 when the widget is clicked a bookmark box appears and asks if I want to save it as a bookmark. I'm not a programmer of the Java script so I hope help here! Here's the script:

  • "< a href ="http://www.susangabrielle.com/1/feed"title ="RSS"alt ="rss">< /a >"
  • The view is http://www.susangabrielle.com

    Probably you fixed, the RSS seems to work for me

  • How can I activate the java script

    original title: Java script

    How can I activate the java script

    Internet Explorer 8:

    1. Open Internet Explorer, click on the "Tool" button in the menu bar, click 'Internet Options' and then select the security"" tab.
    2. Select the 'Internet' zone, select "Custom level" and go to the "Security settings - Internet Zone" box.
    3. Click the checkbox enable "Active Scripting" under the Scripting section, and then click the OK button to apply the settings. Restart your browser when you have finished to apply the settings and enable JavaScript.

    Firefox:

    http://support.Mozilla.com/en-us/KB/JavaScript

    Chrome (for the old version, but could be similar):

    http://www.chromefans.org/chrome-tutorial/how-to-disable-JavaScript-nojavascript-NoScript-in-Google-chrome.htm

    Questions about installing Windows 7?
    FAQ - Frequently Asked Questions from Installation Windows 7 & responses

  • What is the java script code that makes an annotation appears as flattened (permanent) on a page?

    I have custom dialog box based on the java script code that prompts the user to enter data for a room tag.  This label is then annotated on the pdf document. At the present time, the captured annotation can be deleted.  I want to be show as permanent on the pdf page. 

    Thank you.

    You must flatten the page that this annotation is one to convert static content into PDF. To do this, use the Doc.flattenPages () method:

    The SDK Acrobat DC - Doc.flattenPages () SDK documentation

  • Could not create the Java virtual machine

    Hello

    I am using VM ware and installed Linux operating system.

    In my MedRecDomain of Weblogic Admin Server to start and also to start MedRecSvr1.

    But MedRecSvr2 & 3 do not stand up.

    Details:

    OS: Linux

    Details of the JVM: JAVA memory arguments: -Xms512m-Xmx512m

    WebLogic Version: 10.3.6

    Please see the Journal as shown below,

    [root@ram bin] #./startManagedWebLogic.sh MedRecSvr2 &

    [1] 3194

    [root@ram bin] #.

    .

    Arguments of memory in JAVA:-Xms512m-Xmx512m

    .

    Start mode of WLS = Production

    .

    CLASSPATH=/opt/labs/ows/wlshome/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/labs/ows/wlshome/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/labs/ows/wlshome/jrockit_160_29_D1.2.0-10/lib/tools.jar:/opt/labs/ows/wlshome/wlserver_10.3/server/lib/weblogic_sp.jar:/opt/labs/ows/wlshome/wlserver_10.3/server/lib/weblogic.jar:/opt/labs/ows/wlshome/modules/features/weblogic.server.modules_10.3.6.0.jar:/opt/labs/ows/wlshome/wlserver_10.3/server/lib/webservices.jar:/opt/labs/ows/wlshome/modules/org.apache.ant_ 1.7.1/lib/ant-all.jar:/opt/labs/ows/wlshome/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/opt/labs/ows/wlshome/wlserver_10.3/common/derby/lib/derbyclient.jar:/opt/labs/ows/wlshome/wlserver_10.3/server/lib/xqrl.jar

    .

    PATH=/opt/labs/ows/wlshome/wlserver_10.3/server/bin:/opt/labs/ows/wlshome/modules/org.apache.ant_1.7.1/bin:/opt/labs/ows/wlshome/jrockit_160_29_D1.2.0-10/jre/bin:/opt/labs/ows/wlshome/jrockit_160_29_D1.2.0-10/bin:/usr/lib/qt-3.3/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/root/bin

    .

    ***************************************************

    * To start WebLogic Server, use a username and *.

    * password assigned to an administrator-level user.  For *.

    * server administration, using the WebLogic Server *.

    * console in http://hostname/ReportServer: port/console         *

    ***************************************************

    from weblogic with the Java version:

    Java version "1.6.0_29".

    Java (TM) SE Runtime Environment (build 1.6.0_29 - b11)

    Oracle JRockit (R) (build R28.2.0-79-146777-1.6.0_29-20111005-1807-linux-ia32, update mode)

    WLS starting with line:

    /opt/labs/ows/wlshome/jrockit_160_29_D1.2.0-10/bin/java - jrockit-Xms512m-Xmx512m-Dweblogic.Name=MedRecSvr2-Djava.security.policy=/opt/labs/ows/wlshome/wlserver_10.3/server/lib/weblogic.policy-Dweblogic.ProductionModeEnabled=true-Dweblogic.security.SSL.trustedCAKeyStore=/opt/labs/ows/wlshome/wlserver_10.3/server/lib/cacerts-da-Dplatform.home=/opt/labs/ows/wlshome/wlserver_10.3-Dwls.home=/opt/labs/ows/wlshome/wlserver_10.3/server-Dweblogic.home=/opt/labs/ows/wlshome/wlserver_10.3/server-Dweblogic.management.discover=false-Dweblogic.management.server= http://10.0.2.15:7020 -Dwlw.iterativeDev=false-Dwlw.testConsole=false-Dwlw.logErrorsToConsole=false-Dweblogic.ext.dirs=/opt/labs/ows/wlshome/patch_wls1036/profiles/default/sysext_manifest_classpath:/opt/labs/ows/wlshome/patch_ocp371/profiles/default/sysext_manifest_classpath weblogic. Server

    [ERROR] [memory] Could not commit 524288 KB memory heap at 0x95e09000.

    Could not create the Java virtual machine.


    Also, when the managed server stop also get the same question,

    [root@ram bin] #./stopManagedWebLogic.sh MedRecSvr2

    If you stop Weblogic Server...

    [ERROR] [memory] Could not commit 524288 KB memory heap at 0x95e09000.

    Could not create the Java virtual machine.

    Fact

    Stopping Server Derby...

    Derby server stopped.

    [root@ram ~] # cat/proc/meminfo

    MemTotal: 511620 kB

    MemFree: 5224 kB

    Stamps: 760 kB

    Caching: 20440 kB

    SwapCached: 109492 kB

    Active principles: 219424 kB

    Inactive: 220788 kB

    Active (Anon): 210272 kB

    Inactive (Anon): 210408 kB

    Active (leader): 9152 kB

    Inactive (queue): 10380 kB

    Unevictable: 0 kB

    Mlocked: 0 kB

    HighTotal: 0 kB

    HighFree: 0 kB

    LowTotal: 511620 kB

    LowFree: 5224 kB

    SwapTotal: 1048568 kB

    SwapFree: 1516 KB

    Sale: 12 KB

    Writeback: 512 KB

    AnonPages: 309740 kB

    Mapped: 12684 kB

    Shmem: 1628 kB

    Slab: 48500 kB

    SReclaimable: 12196 kB

    SUnreclaim: 36304 kB

    KernelStack: 2656 kB

    PageTables: 9104 kB

    NFS_Unstable: 0 kB

    Bounce: 0 kB

    WritebackTmp: 0 kB

    CommitLimit: 1304376 kB

    Committed_AS: 2210364 kB

    VmallocTotal: 505912 kB

    VmallocUsed: 5196 kB

    VmallocChunk: 486476 kB

    HugePages_Total: 0

    HugePages_Free: 0

    HugePages_Rsvd: 0

    HugePages_Surp: 0

    Hugepagesize: 2048 kB

    DirectMap4k: 6080 kB

    DirectMap2M: 518144 kB

    Please help identify the problem.

    Thnks in advance

    Kind regards

    Bouchra Arun

    Web Site: http://www.industryvertical.co.in/

    People,

    This issue has been resolved,

    Details of the problem:

    RAM 512 MB only, use JVM parameters

    "" Arguments of memory in JAVA: -Xms512m-Xmx512m ".

    If WL struck to use more memory for the start and the stop MedRecSvr2, 3 (managed server)

    Please read the following steps to correct,

    1. open Oracle VM Virtual box

    2. go to settings and select the system option (make sure that all OS turns off).

    3. go in card mother in this window select Base memory previously is changed to 1920 MB (1.875 GB) 512 MB.

    4. click on Ok.

    Then the allocated RAM will be more, for Weblogic doesn't get knocked because of insufficient RAM memory.


    Respect,

    Bouchra Arun

    Portrait of the industry

    Please Mark Helpful / good answer

  • How to write the Java script to reference the 1st page 2nd page text field?

    Hello

    I'm developing an interactive form of VISITOR info with webdynpro ABAP, his as well as 2 pages. Their hierarchy is,

    VISITOR_form
        |
        |
        |------Page_1
        |            |
        |            |
        |            |------Text_Field_A_1
        |            |
        |            |------Text_Field_A_2
        |
        |------Page_2
                     |
                     |
                     |------Text_Field_B_1
                     |
                     |------Text_Field_B_2
    

    Now, I chose the 'Text_Field_B_1' of page_2 and write the script Java, my requirement is; If Page_1's ' Text_Field_A_2' is set to 'Value_ABCD', THEN the 'Text_Field_B_1' of page_2 should be 'readOnly '. Pls let me know WHT is the Java script for this requirement?

    If (xfa.event.newText == "ABCD)."
    {

    VISITOR_form. Page_2.Text_FieldB_1.access = "readOnly";

    }

    Put the script on the Text_FieldA_2 change event

  • error osdm 'could not create the Java virtual machine.

    Running Windows XP. Reports of SQL Developer Java (TM) Platform = 1.5.0_06

    I downloaded and unpacked the liberation of the adopter early osdm, but when I double click on the osdm.exe, I get a dialog box titled "Java Virtual Machine Launcher" with the error:
    could not create the Java virtual machine.

    I don't know where to start to fix this problem.
    Is there a newspaper, the trace file somewhere?
    Need something specific in my path or environment variable set?

    Problem has been solved by reducing the maximum segment size Java (this parameter:-Xmx).
    Xmx512M-Xms128M (Xms64M-Xmx512M-or)

    Published by: user736333 on October 31, 2008 08:52

  • a web site that I use every day tells me that I must now download flash and enable the java script, how can I do this?

    I use the American family site every day, and today when I went to play the games that I play every day instead of the game coming to the top, a notice that says I have to install flash and activate java script in order to see these games.

    You do not have the Shockwave Flash 11.0 r1 plugin so Flash should work.

    You can test here:

    That leaves option that you've blocked JavaScript.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • my computer windows vista cannot install Mcafee because of the Java script error, code 0x80004005. How to solve this problem?

    When I install Mcafee, the error come out, can not install... Make sure you only if your PC has JAVA script. error code: 0x80004005, HOW t ofix it?

    Which version of Java should I download for my system to Windows 64-bit operating?
    http://www.Java.com/en/download/FAQ/java_win64bit.XML

    Installation of Java
    http://Java.com/en/download/help/index_installing.XML?user_os=Windows%207

    If you are using:

    * 32 - bit Internet Explore (IE), you need to download Java 32 bits (check the browser)
    * 64 - bit IE, you need to download Java 64 bit (check the browser)
    * 32-bit and 64-bit, IE you have to download 32-bit and 64-bit Java respectively

    64-bit operating system Windows comes with browsers Internet Explorer (IE) 32-bit and 64-bit. 32-bit IE comes by default. There are different versions of Java software available for download depending on whether you are using THE 32-bit or 64-bit browsers.

    Please note that the 64-bit Java is presented as a download option automatically for users of Internet Explorer 64-bit, as this is the only officially available for Windows 64-bit browser.

    Note: Java is updated on a frequent basis, you can expect to see a Java update notification in the bar from time to time.

    J W Stuart: http://www.pagestart.com

  • Create the Groovy Script Version

    One of our clients wants to use ODI Version as part of their publication process. This is not the version of case numbers generation but rather the ability to capture a snapshot of the mapping in the scenario

    This is not a problem of GUI - just as you must click on the browser and select versions-> create new version.

    I can't find a method of the Java API for this. Any ideas?

    My goal is to automate the generation of versions at release

    Sorry, but ODI does not provide APIs for version management.

Maybe you are looking for

  • Is no longer able to sync to iPod album art

    All my album in my library artwork iTunes stopped syncing with my iPod - even the music I bought on the iTunes store. How can I restore it? I've been deleting music from my library to create capabilities but no joy so far.

  • Why can't Stickies app note remember its position?

    I have a few Stickies by virtual desktops. The problem is, whenever I have to restart the OSX, because an update of the OS for example, a sticky note does not restore the virtual desktop that was before restarting. So, I have to move EVERY post-it fo

  • Windows7 on Qosmio G30

    I need serious help with my laptop Qosmio G30-163 of Windows XP MCE upgrade > windows 7. I ve run the Advisor to upgrade several times, but won´t still go through the installation If you can help me then ask my Skype and we can run it all french. Sin

  • Photosmart HP 5520. First installation cannot start configuration eprint. Could not be updated

    I installed the wireless printer successfully, but unfortunately I can't start installation e-print. After that I agreed to the installation it says impossible to update. The local network uses dhcp THAT SSID is hidden and I use wpa2. Once again the

  • To access the programs at startup, which could be accessed via windows defneder

    I use MSE so Defender is disabled. How to access and modify the programs that run on start up? I can't do this with the disabled Defender. No error message Fact no added software or hardware recently Sought access via the MSE but no luck