Switch to javascript value IDOCS

I'm moving my Web site context root javascript code so that I will be able to open a page popup on some user action.

It seems that the IDOCS script will not run if placed in the < SCRIPT > tags...

Copy the following code in my:
< script > var contextRoot = <!-$HttpContextRoot->; < /script >

It is rendered as:
< script > var contextRoot =; < /script >

Is it possible that I can make one of these:

(1) run IDOCS within the SCRIPT tag.
(2) get a context root for Javascript
(3) some how resolve the url of the page to the side Server and send it to the customer. (I think it goes back to the question (1). Not sure)

You can certainly send Idoc Script JavaScript. Since Idoc Script runs on the server side, it runs before JavaScript. This means that you must put quotation marks (single or double) around your Idoc Script.

Jonathan
http://jonathanhult.com

Tags: Fusion Middleware

Similar Questions

  • Move links to javascript value when the page is loaded

    Hello

    I use JDeveloper 11.1.2.4.0.

    When loading my jsf page, I want to pass the value of the lat, long columns of links the attribute so that the map google map is rendered correct loading of the page.

    I can do when a button is clicked.  But I want to do it when the page is loaded.

    Any ideas?

    Thanks in advance.

    Here is the code snippet, which includes the javascript function: instead of coding hard - 34.397 and 150.644, I would like to happen next as parameters or

    access it some how from the pagedef attribute binding.

    < f: facet name = "metaContainer" >
    " < af:resource type = 'javascript' source = ' https://maps.googleapis.com/maps/API/js?v=3.exp & Sensor = false "/>
    < af:resource type = "javascript" >
    var map;

    initialize() function
    {
    var mapOptions =
    {
    Zoom: 8, Center: new google.maps.LatLng (-34.397, 150.644)
    };
    card = new google.maps.Map (document.getElementById('map-canvas'), mapOptions);
    }

    google.maps.event.addDomListener (window, "load", initialize);
    < / af:resource >
    < / f: facet >

    Hello

    set a listener of phase for the view (using the beforeMethod on the f: view of the page markup). In the method, then use the ExtendedRenderKit Service to call JavaScript from Java. The method must listen for the phase PREPARE_RENDER, who is the liaison for the page to exist. You can access the link from BindingContext.getCurrent () .getCurrentBindings () layer. From there, you call (AttributeBinding) bindings.get ("the binding of the attribute name") to get the attribute mandatory and then - in a next step - the inputValue with data to transmit

    Call JavaScript from Java:

    String script = «...» Add JS calls to set values in JS variables accessed by Google Maps"

    ExtendedRenderKitService erks = Service.getRenderKitService (context, ExtendedRenderKitService.class);

    erks.addScript (context, script);

    Frank

  • sensitizer javascript value change side pl/sql server

    Helllo, I use apex 4.2.1 and need to change the default value for a text element whenever the selection changes in a drop-down list.

    The new value is the result of some queries. Maybe I'm too complicated but I tell myself that I use of DA and need something along the lines of:

    1. get new selection via javascript, have it somehow spread to the server-side
    2. call pl/sql block, the server knowing the new value can set the session state of the running text element is necessary regardless of logic/query
    3. refresh the region containing elements so that the new text is displayed

    But I'm stuck at step 1 - I can use $v ('P1_DROP_DOWN') to get the selection has changed, but how the Server aware of the change to make the P1_DROP_DOWN bind variable reflects the new value without having to submit the entire page?

    Take a look at the real action "run the plsql block" dynamic action and "page elements to present" and "items to the page" items available in this real action. Clicking Help in will help them.

    Don't forget that PLSQL is run serverside.

  • [CS3 JavaScript] Value or reference to an object

    Hi all

    My programming experience was not oriented object C when I was very young, I remember vaguely that it seems always easy to know if a function or an expression will return a value or a reference to an object.

    Here is an example. When I take in corrections to the InDesign files, I often do a very quick search, down where the insertion point is at the end of the story, but only with depression a keyboard - not having to click, click on and type in the find/replace clean with InDesign dialog box. So I wrote a quick script to do this, where you can enter a search string.

    But trying to isolate the text range to search is difficult.

    mySelection = app.selection [0];

    textrangeToSearchWithin = mySelection.parentStory.characters.itemByRange (mySelection.index, mySelection.parentStory.characters.length - 1);

    The itemByRange() method that above seems to return a string, not a reference to the object in InDesign itself. I tested this by finding the name of the manufacturer of its parent and the parent - both seem fair. But referring to the object in InDesign itself is required if I am looking in the range of text using the InDesign findText() method and then determine what is the index in the history of the first found occurrence.

    Can I force itemByRange() to return a reference? And a more general question, how predictable returns of methods of InDesign?

    My questions might be due to my not be very well versed with JavaScript rather than what it is to do with InDesign, but I couldn't find answers on the ' net.

    Bye bye

    Paul

    itemByRange can take some getting used to. The way you used it, it

    Returns a character-table object (it's pretty hard to explain).

    You can change that in a normal array of characters with

    getElements();

    A better way to get a range of text is:

    mySelection = app.selection [0];

    textrangeToSearchWithin =

    mySelection

    . parentStory.texts.itemByRange (mySelection.characters.item (0),)

    mySelection.parentStory.characters.item(-1));

    Substances

  • Change the text color to RGB using JavaScript value

    I have a text to channel 17 cast member and would like to change the color of the text with JavaScript. I tried a few different methods, but don't see any visible change in the text, it remains simply white. What Miss me?

    Try changing the color of the Member:
    Sprite (17).member.color = color (6, 6, 6);

  • How do cPath in ExportAsXfdf when we call our plugin JavaScript?

    Hello

    I am able to export the file using javascript through my plugin... But if I spent cPath variable also, it does nothing... I'm not able to switch to cPath value correctly...

    What should be the cPath syntax when we call javascript plugin?

    If I write this

    char * buf = "this.exportAsXFDF({bAnnotations:true});)";

    AFExecuteThisScript (pdDoc, buf, NULL);

    It works very well.

    But I also mention cPath it are not exported xfdf

    char pathname [256] = "/ / C//Users//ishitas//Desktop//ishita.xfdf";
    char * buf = "this.exportAsXFDF({cPath:path,bAnnotations:true});)";
    AFExecuteThisScript (pdDoc, buf, NULL);

    or

    char * buf = "this.exportAsXFDF ({cPath: \"//C//Users//ishitas//Desktop//ishita.xfdf\",bAnnotations:true});});
    AFExecuteThisScript (pdDoc, buf, NULL);

    How should I spend cPath?

    Help, please...

    Hello

    I worked on how you can call this function from a plug-in, but it is not as easy as I thought it would be despite what you do a plug-in executes this code directly appears not to be one of the available options.

    My solution is to create a confidence function and call that from the plugin.

    To do this you must create a JavaScript file and install it in the JavaScript in the application folder ({acrobat install dir} {/ acrobat/JavaScript})

    This JavaScript file contains the following code

    Beginning of the code

    myExportXFDF = app.trustedFunction (function (myDoc, myPath)

    {

    app.beginPriv ();

    myDoc.exportAsXFDF ({cPath: myPath});

    app.endPriv ();

    });

    end of the code

    and the code in the plug-in looks like this

    beginning of the code

    configuration string to call the new function, we created

    char * myString = ' myExportXFDF (, ' / c/temp/myFile2.xfdf') ";

    Download the active document

    AVDoc avDoc = AVAppGetActiveDoc();

    PDDoc pdDoc = AVDocGetPDDoc (avDoc);

    Run the script

    AFExecuteThisScript (pdDoc, myString, NULL);

    A bit of a clumsy workaround for something that I think should be simple, but I hope it helps.

    Concerning

    Malcolm

  • How to write something javascript pageFlowScope?

    Hi all

    How to switch to pageFlowScope javascript value?

    Thanks in advance,
    s o v i e t

    You can use the tag serverListener to raise a custom event that will be managed by a method used to set the value on the pageFlowScope server-side.

    Look: http://www.oracle.com/technology/products/adf/adffaces/11/doc/multiproject/adf-richclient-api/tagdoc/af_serverListener.html

  • AppleScript - extraire extract values from a table, create a text file with these values

    Hello world

    Lets say I have a table that looks a bit like this

    And this table I would create 2 text files (or even more, depending on how many switchnames are there) who look a bit like these

    Is it still possible?

    I suppose to create a Service (which can be called in numbers) with Automator which includes an Applescript script - but - no idea since the script is not one of my strong suits.

    There is not need to be perfect, because tables are not necessarily the model presented above - so to tweek the script to the application will be necessary. The text files can be created/saved in the same folder as the file numbers is in.

    Y at - it script-genius out there?

    See you soon

    Florian

    Select the column of fist of the data, and then run this script by copying the Forum and paste it into the script editor.  The files will appear on the desktop

    say application "Numbers".

    say front document to tell the worksheet active

    say ( class is worn) fromfirst table whose selection range

    selectionRange defined in column 1 of the selection

    set cnt to 0

    the value destRange for range

    the value currentList to {}

    -the list of switches

    Repeat with acellule in selectionRange cells

    -say acellule to set the value on the NTC

    pass the value to the value of cell

    if and ((cnt > 0) (switch is not missing value) and (currentList is not contain switch)) then

    switch and the value in the currentList currentList

    end if

    NTC put to the cnt + 1

    end Repeat

    -Display dialog box "to the list of items is:" & currentList & "a list" & (currentList County) ".

    Repeat with aswitch in currentList

    " game textOut to '# Script generated with Applescript for switch' & aswitch &"

    # on "& (today's date) &"

    !

    conf t

    "

    set cnt to 0

    Repeat with acellule in selectionRange cells

    -say acellule to set the value on the NTC

    pass the value to the value of cell

    -Display dialog "aswitch is []" & aswitch & "] and switch is []" & switch & "]".

    if (aswitch contains the switch) then

    the value cellCol to address a column of first cell of acellule

    address of line of first cell value cellRow in of acellule

    value to the aport (value of the cell of the column (cellCol + 1) cellRow) integer

    the value vlan for the (value of the cell cellRow of column (cellCol + 2)) integer

    the value desc to the (value of the cell cellRow of column (cellCol + 3))

    " put to textOut textOut &.

    !

    "" IG 1/0 interface / "& aport &.

    switchport mode access

    switchport access vlan "" & vlan & ""

    Description LINK TO "" & desc & ""

    "

    on the other

    -Display dialog box "did not: []" & aswitch & "] and []" & switch & "]".

    end if

    NTC put to the cnt + 1

    end Repeat

    Set myFile to open for access (path to the Office as text) & aswitch & '_output.txt' the with write permission

    textOut write to myFile

    MyFile close access

    end Repeat

    end say

    end say

    end say

  • Filter unwanted numbers when changing values

    Hello

    I want to filter unwanted numbers that occur when switch between different values.

    I have 5 buttons that are all interconnected to disable the other when one of them is enabled (using the Set/Reset mechanism). The Boolean value of each key are sent in an array that is converted to an integer. The values I need that exits Digital are 1,2,4,8,16. When I change the values from 1 to 4 for example, it will be in the order of 1-> 5-> 4. This is caused by the fact that for a very short time, two tables are True.

    In other words, I need to filter the number 5 and all the other values that aren't 1,2,4,8,16 and only pass these values. It must also work in the opposite direction, for example, 4-1.

    .

    Any thoughts?

    / Johan

    ... or this:

    This isn't what you asked, but it does what I think you want, is more easy to scale and easier to use on the front panel.

  • using PostDelayedCall how to get the value passed through void * callbackData?

    Can someone tell me how to get the data passed through void * callbackData?

    The following code, panel_ptr has the right address but still contains zero.

    void CVICALLBACK value_changed (void * callbackData)
    {
    int * panel_ptr;
     
    panel_ptr = callbackData;
    calculate_new_value (* panel_ptr);
    }

    int sign;

    Panel = 2;

    PostDelayedCall (value_changed & Panel, 0.2);

    The problem is using the callbackData parameter if it is a pointer, it must be a pointer to something which is still topical at the moment that the callback executes. That is to say, you cannot pass the pointer to a local variable in callbackData as when the callback executes the pointer is no longer valid. You can switch from its value, instead, in this way:

    ... SomeFunction)

    {

    int sign;

    ...

    Panel = 2;

    PostDelayedCall (value_changed, (void *) Panel, 0.2);

    ...

    }

    void CVICALLBACK value_changed (void * callbackData)
    {
    int panel_ptr;
     
    panel_ptr = (int) callbackData;

    calculate_new_value (panel_ptr);

    return;
    }

    There are many discussions on the forums on callbackData parameter that you might want to read.

  • Separate VSANS / Mgmt / Vmotion traffic on different switches

    Hello

    I want to build a hybrid Cluster VSAN 4 knots (6.x).

    I have 2 x 10GE switches dedicated for Taffic VSAN

    also 2 * 1GBE switches for management / VM / Vmotion traffic

    Each host has 2 10 GbE NIC, 1 uplink for each of 10GBE switches

    Each host also has 4 * rising 1GBE, 2 for each of the switches 1GBE

    My idea is to use 10GBE just for VSAN traffic (separate DVSWitch, an asset, a standby) on each 10GBE switch

    Also to use 2 Ports on the management traffic (separate DVSWitch, an asset, a standby) on each 1GBE switch

    And use 2 Ports on traffic VM (separate DVSWitch, an asset, a standby) on each 1GBE switch

    VMotion traffic would be on the same rising as management, but active / standby vice versa

    Question: is - this possiuble / useful to connect vmotion for 10 GbE uplink ports (active standby vice versa VSAN traffic)

    I appreciate any useful comment on my scheduled install (I have no boy networking)

    Couple thoughts.  You can run several vKernels to VSAN and vMotion (allowing one on each switch).  To VSAN, use of VLANS / subnets (one on each switch offers you a pleasant has / B space) while vMotion must have all the vkernel on the same subnet 2 ideally layer.  This allows for maximum reliability, in theory faster failover and access flow.  This also has the advantage of if your cluster is not big (bigger that say 48 ports) you can avoid having multicasting, leaving the switch (usually requires more quarrels with the cats of network) as each switch TOR will have its own VSAN network.    Then use the NIOC for butterfly and protect the traffic between them.  Now the NIOC is not as effective as SR - IOV (but its good enough) to 100% and you will maximize your investment 10 Gbps without swamping the things.

    • Network management interface VMkernel = explicit order of Fail-over = active P1 / P2 ensures 10.1.1.1/24 VLAN 100
    • vMotion VMkernel - an explicit order of Fail-over = interface = active P1 / P2 ensures 10.1.2.1/24 VLAN 101
    • vMotion VMkernel-B interface = explicit Fail-over order active = P2 / P1 ensures 10.1.2.2/24 VLAN 101
    • Machine virtual Portgroup = explicit Fail-over order = active P1 / P2 ensures 10.1.2.1/22 VLAN 102
    • Virtual VMkernel-A SAN interface = explicit order of Fail-over = active P1 / P2 in standby (or not use) * 10.1.3.1/24 VLAN 103
    • Virtual interface of SAN VMkernel-B = explicit Fail-over order active = P2 / P1 Eve (or not use) * 10.1.4.1/24 VLAN 104

    In this case, VLAN, 100, 101 and 102 will be on all switches.

    * 103 and 104 could be configured to only exist on each switch (has / B isolation, failover do not switch on the value and set up on both) or exist on both (and use standby) as described.  This design will focus on maintaining the communications host-to-host on the same switch (decreases complications with multicasting and reduces its lag time as VSAN traffic does not have to jump to another switch unless you run out of switch ports, but now with dense 40Gbps past using 10 Gbps break out in theory you could hit the limit of 64 nodes on a single switch).

    I'm curious of anyone thoughts on just disable the failover and forcing them to each core sticking to its switch (and accepting loss of communication) on this vKernel in the event of a switch failure.  I want to do some tests with both laboratory and to test the failover of the switch/path between both of these configurations (compared to a configuration unique vkernel).

    However, some people prefer a 'simpler' configuration if (and I'm not opposed to that).

    Duncan drawn active passive failover configuration with of the vKernel unique for each host.

    In theory not being not not as dependent on the NIOC for insulation of storage should help the latency for the short bursts it takes to NIOC launch design active active vs.

    Control IO SAN and virtual network

    • Network management interface VMkernel = explicit order of Fail-over = active P1 / P2 ensures
    • vMotion VMkernel interface = explicit Fail-over order = active P1 / P2 ensures
    • Machine virtual Portgroup = explicit Fail-over order = active P1 / P2 ensures
    • SAN VMkernel virtual interface = explicit order of Fail-over = P2 active / standby P1
  • The element of Interaction of the user does not correct my Boolean attribute value

    Hello

    I'm just starting using the element of User Interaction. In my workflow, I set several attributes - some string and a Boolean value. I have a script task that makes treatment and eventually set these attributes. I then a piece of User Interaction that has these characteristics than external contributions. The Interaction of the user unit shows the correct values to strings, but the Boolean value is always shown as wrong - regardless of what I put the attribute in the script task immediately preceding.

    I'm confused. I plugged everything in the binding in the same way, but it does not seem to reflect the State of the attribute. I can switch the Boolean value in the Interaction of the user and the attribute is replaced as expected.

    Thank you

    Edit: I have reproduced this issue with a very simple affair. Make a new workflow and put only a part of the Interaction of the user in it. In the UI element, create an external of entry as a Boolean attribute of the workflow. Default font to True/Yes. When you run the workflow, the user interface element shows the value as a no.?

    Hello

    Looks like a bug in the client Java vRO (but works in vSphere client to Web). I am able to reproduce it in my environment, on the two vRO 6.x and 7.0.

    I'll open a PR in order to track and remedy in the future vRO releases.

    BTW, I vaguely remember there is a reported similar problem long time for vCO 4.x. It seems that the problem has reappeared again in silence

  • Dynamic action fails using the null value on the list of selection change event

    I have a selection list that I created a dynamic action to which I added a value set to to clear the values of other controls on the form by assigning the value NULL.

    This doesn't seem to work, and I can't understand why it does not work.

    Event = change
    Selection type = Items
    Items = P4_MYSELECTLIST
    (no other condition for this action, I want it to reset for each change in the selection list).

    Fire on the Page Load = False (I only want what he reset values when I use this list of choices, not the page load).
    Set Type = static assignment
    Value = NULL
    Items = P4_ITEM1, P4_ITEM2, P4_ITEM3 (including 2 other lists of selection and control of text)
    Remove the Change = No event

    Xanas,

    If you set the values NULL and not the literal string "NULL" you must change your DA slightly. Modify your game to run JavaScript Code.

    Action = run the JavaScript Code
    Fire on the Page Load = False (I only want what he reset values when I use this list of choices, not the page load).
    Code = this.affectedElements.val ('');
    Items = P4_ITEM1, P4_ITEM2, P4_ITEM3 (including 2 other lists of selection and control of text)

    Edit:
    You can also change the real action to the following if you want to leave your DA as setpoint:

    Fire on the Page Load = False (I only want what he reset values when I use this list of choices, not the page load).
    Set Type = Expression JavaScript
    Value = "
    Items = P4_ITEM1, P4_ITEM2, P4_ITEM3 (including 2 other lists of selection and control of text)
    Remove the Change = No event

    Good luck
    Janet Tyson

    Published by: Tyson Janet on January 10, 2012 09:52

  • Hide/show the area, keep the value between pages?

    Hello

    I use APEX 3.2.1 with Oracle 10 g on Windows XP Pro SP3.

    I have 2 menus (regions) that can be hidden or shown by clicking on an image (as in some IDE). The following javascript code is called on the event 'onClick ':
    function visibilite(region,image) {
         if (region.style.display == "none")
              region.style.display = "" ;
         else
              region.style.display = "none" ;
         if (image.src.indexOf('gauche.png',1) == -1)
              image.src = image.src.replace('droite.png','gauche.png');
         else
              image.src = image.src.replace('gauche.png','droite.png');
    }
    It works perfectly, but when I navigate to another page, the menus are obviously displayed by default...
    So, I just want to keep the value of the previous page to show or hide my menus in the current page.

    I can add the page element in all pages and assign the value using the url, but it is not optimized as I will have a lot of pages (> 100).
    I can use a request element too, but I tried and I can't assign a javascript value, and I don't know if this is a good solution because it will force I call the javascript function, just after that the menu will be displayed, to hide quickly.

    anyone think of another solution?

    Thank you.

    Yann.

    I can add the page element in all pages and assign the value using the url, but it is not optimized as I will have a lot of pages (> 100).

    Create a Page 0 item which will be available on all pages.

    OR

    I can use a request element too, but I tried and I can't assign a javascript value

    Enforcement point values can be set from JavaScript using AJAX and an application process.

  • Set the screensaver via the Terminal timer

    El Capitan, latest version running

    Hello

    To manage remote computers, I would like to set the timer to 0 CLI screen saver. I've seen several posts suggesting changing the entrance of com.apple.screensaver.plist called 'idleTime' but as far as I KNOW, there is no such key in this plist: affects only info on the current screen saver and a 'type', as you can see here.

    I tried to add this key, but it did not work.

    How can I achieve that?

    Thank you

    AS

    Those that are stored in the ByHost folder. To change those, add the switch - currentHost:

    values by default - currentHost write com.apple.screensaver temps_inactivite 1800

    In addition, this key exists only if you change. If you leave it at the default of 20 minutes, there is no need key.

Maybe you are looking for

  • How retrieve you definition of folder to the Everyone group permission to deny

    How retrieve you definition of permission of folder to the Everyone group for refusing on Server 2003

  • Vista theme

    my windows vista theme keeps coming back to an older theme. When I change service settings is ok, but as soon as I restarted it, it comes back again.

  • Passwod admin problem

    I changed my password for my second user accounts and admin, and although two passwords have been accepted by the Assistant password, my admin password will not work. My second password works fine. How to rebuild the password so I can use my admin ac

  • Illustrator constantly answer cc2015

    It can be 5 minutes or 30 minutes, but every time, without fail, stops just Illustrator in response, freezes completely up and I have to go in my taskbar, end task, and then restart Illustrator. Every time. WHY? It's so frustrating! I tried to uninst

  • 5.7 upgrading of cc

    HelloI have a subscription to the CC. I still have Lightroom version 5.7.1 (updated September 20, 2015). I read that Lightroom version 6 or CC 2015 must be available I want to use. But the CC-manager said that my apps are up to date. How does this wo