Call FacesMessage via javascript.

Hello

I use Jdev 11.1.1.7.0.

My requirement:

I need to display an error message in text through java script. not java.

I refereed more link.

http://Ahmed-alzamer.blogspot.com/2014/02/prevent-copycutpaste-in-input-fields.html

https://community.Oracle.com/thread/2280441?start=0 & tstart = 0

https://community.Oracle.com/thread/2260370?TSTART=0

But I can't able to get my desired results.

.jsff page

<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
          xmlns:f="http://java.sun.com/jsf/core">
...
    <af:messages id="m1"/>
...
<af:panelLabelAndMessage label="x No:" id="plam11">
          <af:inputText label="Label 5" id="it1" simple="true" clientComponent = "true"
                        binding="#{viewScope.x.bindxno}"
                        valueChangeListener="#{viewScope.x.xNumberValueChange}">
            <af:clientListener method="validatexeNumber" type="blur"/>
            <af:clientListener method="fieldKeyPress" type="keyPress"/>
          </af:inputText>
          <af:message id="m10" for="0:it1" clientComponent = "true"/>
</af:panelLabelAndMessage>
...

External.js

way 1:
function fieldKeyPress(event) {
          var charCode = event.getKeyCode();
          if (!testcode(charCode)) {
AdfPage.PAGE.addMessage('it1', new AdfFacesMessage(AdfFacesMessage.TYPE_ERROR, "Error", "Enter only numbers"));
AdfPage.PAGE.showMessages('it1');
event.cancel();
          }
      }

way 2:
function fieldKeyPress(event) {
          var charCode = event.getKeyCode();
          if (!testcode(charCode)) {
AdfPage.PAGE.addMessage(evt.getSource().getId(), new
AdfFacesMessage(AdfFacesMessage.TYPE_ERROR, "Error" , "Enter only numbers" )) ;
event.cancel();
          }
      }

Global error message. Non-input text.

Please someone help me.

Thank you.

Hi svn

Jspx is

If you work on jsff in stubborn taskFlow, in this AdfPage.PAGE.addMessage ("it1", new AdfFacesMessage (AdfFacesMessage.TYPE_ERROR, "Error", "Enter the numbers"));

line, you must change the inputText id, it must be yourRegionid:it1, if you the region id is r1 then there may be r1:it1

I don't know, therefore to confirm, verify clientId for inputText at the bean using inputTextBinding.getClientId ();

and also use the same id in js

Thank you

Tags: Java

Similar Questions

  • Hanging in the updating of the IRR via Javascript

    Apex: 4.2.2.00.11

    I have an IRR that has a checkbox column. Checking the box either includes or excludes this specific row when the page is sent.

    I add a 'global' checkbox in the column header of the IRR report for this column. It controls, checks all the boxes in this column to SORT. Unchecking the contrary fact. The "global" checkbox is a toggle power switch of the checkboxes in the SORT.

    So far so good. Works as expected.

    However, during the updating of the IRR (due to changes of order sorting, additional filters added, etc.), it redraws the region of apexir_DATA_PANEL - and with it, he repaints the table headers too. And this removes the "global" checkbox in the column header. (a page refresh is necessary to return to the "global" checkbox)

    I want to do is add a function call to the Manager of refreshment of the IRR - the last call to the handler is the custom function that adds the "global" checkbox in the column header. Something like:

    . Bind $(«#IRR_OBJECT_HERE») ("onchange", function() {}
    AddGlobalToggle(); Added the check box of the column header if there is
    });

    I tried many references to object (unless the IRR) and managers of events, but without success.

    Is it possible to connect refresh report string of the IRR via Javascript?

    Billy

    Requires as not simply a dynamic action after Refresh on the IR region?

  • How to change the "TextVariable" via javascript

    Hello

    How can I change the value of a "Custom text Variable" via javascript in indesign CS5?

    I understand that there is a 'content' that is me allotted property, but I can't understand how to set or change.

    Here's the javascript code example for reference.

    var docRef = app.activeDocument;
    
    
    for ( var i = 0; i < docRef.textVariables.length; i++ ) {
    
    
        var textVariableItem = docRef.textVariables[i];
    
    
              // Check for the type
              if (textVariableItem.variableType === VariableTypes.CUSTOM_TEXT_TYPE){
    
    
                        var variableOption = textVariableItem.variableOptions;
      
                        // This will give me the text value of the variable
                        alert("Text Variable " + i + " \n " + textVariableItem.name + "\n" + variableOption.contents);
    
    
                        // But how do I set it? 
                        // The following does not seem to work 
                        variableOption.contents = "New custom text..."; 
              }
    }
    
    // Logic behind this script
    
    // theScript()
    // is a wrapper function to provide functional scope to the entire script
    // This function is invoked at the very bottom of the file
    
    // main();
    // the main function that gathers the initial parameters and launches the dialog box
    
    // function mainDialog(docRef, selectedItems, layers, inputs)
    // A function that creates a dialog box this function is passed as a parameter to a "factory method"
    // called function sfDialogFactory(dialog)
    // which is a general purpose utility for creating dialog boxes.
    
    // The mainDialog function has a callback function that responds to the "comtinue" button and after some validation
    // makes a call to a function called
    
    // function doAction(docRef, inputs, options)
    // This is where the main behvior of the script is suppose to be defined.
    // it is designed to be called AFTER the dialog box return and is the result of the callback inside mainDialog
    // The doAction function receives objects that are parameter holders for various inputs and options that come from the
    // dialog box presented to the user
    
    function theScript() {
    ///////////////////////////////////////////////////
    // BEGIN THE SCRIPT
    //=================================================
    
    ////////////////////////////////////////////////////////////////////////////////
    // SCRIPT MAIN PROCESS
    ////////////////////////////////////////////////////////////////////////////////
    // Main Process
    // The beginning of the script starts here
    // Add main logic routine to this function
    
    // Call Main Function to get the ball rolling
    var elementsData;
    var theDocument = app.activeDocument;
    var inputGroup;
    main();
    
    function main(){
    var theSelectedItems = theDocument.selection;
    var theLayers = theDocument.layers;
    
        var myDialog = sfDialogFactory(mainDialog(theDocument, theSelectedItems), theLayers);
        var result = myDialog.show();
        if (result == 1){
            newAction();
            alert("Done");
            }
        else{
            alert("Not Done");
            }
    }
    
    ////////////////////////////////////////////////////////////////////////////////
    // SCRIPT SUPPORTING FUNCTIONS
    ////////////////////////////////////////////////////////////////////////////////
    // Supporting Functions
    // Include functions that offer partial functionality
    // These functions are called and acted upon within the mainProcess function
    function newAction(){
    
            var formData = getControlValues(inputGroup);
            var inputs = {};
            var options = {};
           // alert("callback get form data");
          // Do something with formData values here
            var cLen = formData.controls.length;
            var formValues = '';
            for (var c = 0; c < cLen; c++ )
            {
                if (formData.controls[c].name === "inputECONumber") {
                    inputs.inputECONumber = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
    
                if (formData.controls[c].name === "inputDocumentName") {
                    inputs.inputDocumentName = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
    
                if (formData.controls[c].name === "inputDocumentNumber") {
                    inputs.inputDocumentNumber = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
    
                if (formData.controls[c].name === "inputDocumentRevision") {
                    inputs.inputDocumentRevision = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
    
                if (formData.controls[c].name === "inputDocumentType") {
                    inputs.inputDocumentType = formData.controls[c].value;
                    // alert(formData.controls[c].name + " | " + formData.controls[c].value);
                }
            }//End FOR
        doAction(theDocument, inputs, options);
        }
    
    function mainDialog(docRef, selectedItems, layers, inputs) {
    
    // Main Dialog
    // alert("Main Dialog: " + docRef.name);
    
    if ( docRef === undefined ) {
      alert("Cannot Execute, please select a document.");
    }
    
      var currentData = getMetaData();
    
      var dialogObj = {};
    
      dialogObj.groups = []; // An array of dialog groups
      dialogObj.title = "Update Meta Data";
    
      var groupLabelInfo = {};
      groupLabelInfo.title = "Edit: " + docRef.name;
    
      // Add Elements using JSON shorthand syntax
      groupLabelInfo.elements = [
        {
            "name":"labelECONumber",
            "type":"statictext",
            "value":"Engineering Change Order (ECO) Number",
            "visible":true
        },
        {
            "name":"inputECONumber",
            "type":"edittext",
            "value": currentData.inputECONumber,
            "visible":true
        },
    
        {
            "name":"documentName",
            "type":"statictext",
            "value":"Document Name",
            "visible":true
        },
        {
            "name":"inputDocumentName",
            "type":"edittext",
            "value": currentData.inputDocumentName,
            "visible":true
        },
    
        {
            "name":"documentNumber",
            "type":"statictext",
            "value":"Document Number",
            "visible":true
        },
        {
            "name":"inputDocumentNumber",
            "type":"edittext",
            "value": currentData.inputDocumentNumber,
            "visible":true
        },
    
        {
            "name":"documentRevision",
            "type":"statictext",
            "value":"Revision",
            "visible":true
        },
        {
            "name":"inputDocumentRevision",
            "type":"dropdownlist",
            "value": currentData.listRevisions,
            "visible":true,
            "selection":currentData.selectionRevision,
        },
    
        {
            "name":"documentType",
            "type":"statictext",
            "value":"Label Type",
            "visible":true
        },
        {
            "name":"inputDocumentType",
            "type":"dropdownlist",
            "value": currentData.listDocumentTypes,
            "visible":true,
            "selection":currentData.selectionDocumentType,
        },
    
      ];
    
      // Add to groups to list
      dialogObj.groups.push(groupLabelInfo);
      return dialogObj;
    }
    
    function doAction(docRef, inputs, options) {
    
    alert("doAction " + docRef.name + " \n INPUTS: \n" + inputs.reflect.properties + "\n\n OPTIONS: \n" + options.reflect.properties);
    
    // Get the current contents
    
    var fooContents = app.activeDocument.textVariables.item ('Foo').variableOptions.contents;
    var barContents = app.activeDocument.textVariables.item ('Bar').variableOptions.contents;
    
    alert("GET textVariable contents \n Foo: \n" + fooContents + "\n\n Bar: \n" + barContents);
    
    // Set/Update the contents
    // Why does this not seem to work?
    
    alert("SET textVariable contents \n Foo: \n" + inputs.inputDocumentName + "\n\n Bar: \n" + inputs.inputDocumentType);
    
    app.activeDocument.textVariables.item ('Foo').variableOptions.contents = inputs.inputDocumentName;
    app.activeDocument.textVariables.item ('Bar').variableOptions.contents = inputs.inputDocumentType;
    
    // Script does not seem to reach this point. Why?
    alert("END of doAction");
    }
    
    // A Factory function for creating dialog boxes
    
    function sfDialogFactory(dialog) {
    
        // A factory method for creating dialog screens
    
        // Dialog Window
        var d = new Window("dialog", dialog.title);
    
        // alert("Number of Inputs" + dialog.inputs.length);
        // alert("Number of Options" + dialog.options.length);
    
        var i; // counter
        var len; // length of array elements
    
        // Generate Groups
        if (dialog.groups.length > 0) {
    
            len = dialog.groups.length;
            for (i = 0; i < len; i++ )
            {
                var currentGroup = dialog.groups[i];
                inputGroup = d.add ("panel", undefined, currentGroup.title);
                    inputGroup.alignChildren = ["fill","fill"];
    
                if (currentGroup.elements.length > 0) {
                    // Add Elements
                    var ii;
                    var elemLen = currentGroup.elements.length;
                    for (ii = 0; ii < elemLen; ii++ )
                    {
                        var currentElement = currentGroup.elements[ii];
    
                        var el = inputGroup.add(currentElement.type, undefined, currentElement.value);
    
                        // Additional properties added for future reflection
                        el.elName = currentElement.name;
                        el.elIndex = ii;
    
                        switch(currentElement.type)
                        {
                            case "statictext":
                                el.visible = currentElement.visible;
                            break;
                            case "edittext":
                                el.visible = currentElement.visible;
                            break;
                            case "dropdownlist":
                                el.visible = currentElement.visible;
                                el.selection = currentElement.selection;
                                el.onChange = currentElement.onChange;
                            break;
                            case "checkbox":
                                el.visible = currentElement.visible;
                                el.value = currentElement.value;
                            break;
                            default:
                            throw new Error('Unknown Dialog Element Type [' + currentElement.type + ']');
                        }
    
                    }
                }
            }
        }
    
      // Buttons Group
      var buttonGroup = d.add("group");
      var bOK = buttonGroup.add("button", undefined, "Continue", {name: "ok"});
      var bCANCEL = buttonGroup.add("button", undefined, "Cancel", {name: "cancel"});
    
      return d;
    }
    function getControlValues(set) {
        elementsData = {};
        elementsData.controls = [];
        // TO DO Add more types
    
        var giLen = set.children.length;
        for (var gi = 0; gi < giLen; gi++ )
        {
            var child = set.children[gi];
            // alert(objReflection(child, "none", false));
            // alert(child.type);
            var control = {};
                control.name = child.elName;
                control.index = child.elIndex;
                control.type = child.type;
                control.visible = child.visible;
            switch(child.type)
            {
                case "statictext":
                    control.value = child.text;
                break;
                case "edittext":
                    control.value = child.text;
                break;
                case "dropdownlist":
                    control.value = child.selection.text;
                break;
                case "checkbox":
                    control.value = child.value;
                break;
                default:
                throw new Error('Unknown Dialog Element Type');
            }
            elementsData.controls.push(control);
            // alert(objReflection(control, "none", false));
        }
        return elementsData;
    }
    function getMetaData() {
    // Return a data structure that contains meta data from the document.
    
        var dataObject = {};
    
         // Default arrays
         dataObject.listRevisions = generateRangeOfNumbers ("r", 1, 100);
         dataObject.listDesignComps = generateRangeOfNumbers ("Comp_", 1, 100);
         dataObject.listDocumentTypes = [
                         "Datasheet",
                         "Manual",
                         "Tech Guide",
                         "Other"
                     ];
    
         // Set Sensible Default Values for the UI Form
         if (!dataObject.inputECONumber) {
             dataObject.inputECONumber = "###ECO###";
         }
    
         if (!dataObject.inputDocumentName) {
             dataObject.inputDocumentName = "Document Name";
         }
    
         if (!dataObject.inputDocumentNumber) {
             dataObject.inputDocumentNumber = "048-xxx-30";
         }
    
         if (!dataObject.inputDocumentRevision) {
             dataObject.inputDocumentRevision = "r01";
         }
    
         if (!dataObject.inputDocumentType) {
             dataObject.inputDocumentType = "Datasheet";
         }
    
         return dataObject;
    
    }
    
    function generateRangeOfNumbers (prefix, start, end) {
        // This function generates an array of sequential numbers within a range
        // prefix = string to append to beginning of each element
        // start = the beginning of the range
        // end = the end of the range
        // length = overall number of cycles to loop through, start and end must fall within this value
    
        var output = [];
    
        for ( var i = start; i <= end; i++ )
        {
            if (i < 10) {
                // Add a leading zero
                output.push(prefix + "0" + i);
            }
            else {
                output.push(prefix + i);
            }
        }
    
        return output;
    }
    
    //=================================================
    // END THE SCRIPT
    ///////////////////////////////////////////////////
    }
    
    theScript();
    

    I modified your code shortly. He works for me here. Check it out...

    Thank you

    Green4ever

  • How to set null article Page in Session Via JavaScript

    Request Express 4.2.6.00.03

    We set a value in a control SELECTION, 'P5_DATASET_NAME ', in the session with a dynamic Action on the change of this control.

    We do this with the following JavaScript code snippet:

    Apex. Server.Process ("dummy"

    , {pageItems: '#P5_DATASET_NAME'}

    , {dataType: "text"}

    Async: false,

    complete: function (ajaxResponse)

    {

    var ignoredReturn = ajaxResponse.responseText;

    }

    });

    It works perfectly, as long as the user selects a value not zero in the drop-down list SELECT down. In other words, we can make any selection (other than NULL), pop up the session in the developer toolbar and immediately see the new value it. In addition, if we then refresh an interactive report on the page that uses the value of this element in the SELECT source, he correctly extraction based on the new value.

    * HOWEVER * if the user selects the NULL option (only if they choose this option), value in the session remains unchanged and continues to be set to the previous value. The $v function correctly reports the null value. If the is updated interactive report it is based on the previous value.

    So, the question is, what is special about NULL? How can I position "unplugged", the value of a session (or null) article page via JavaScript?

    Thank you

    -Joe

    Joe Upshaw wrote:

    Request Express 4.2.6.00.03

    We set a value in a SELECTION control, "P5_DATASET_NAME", at the session with dynamic Action on the change of this control.

    We do this with the following JavaScript code snippet:

    Apex. Server.Process ("dummy"

    , {pageItems: '#P5_DATASET_NAME'}

    , {dataType: "text"}

    Async: false,

    complete: function (ajaxResponse)

    {

    var ignoredReturn = ajaxResponse.responseText;

    }

    });

    It works perfectly, as long as the user selects a value not zero in the drop-down list SELECT down. In other words, we can make any selection (other than NULL), pop up the session in the developer toolbar and immediately see the new value it. In addition, if we then refresh an interactive report on the page that uses the value of this element in the SELECT source, he correctly extraction based on the new value.

    * HOWEVER * if the user selects the NULL option (only if they choose this option), value in the session remains unchanged and continues to be set to the previous value. The $v function correctly reports the null value. If the interactive report is updated it is based on the previous value.

    So, the question is, what is special about NULL? How can I position "unplugged", the value of a session (or null) article page via JavaScript?

    Another question is: why are you going to this length instead of just using the source attribute Page to go on IR region, which will be automatically put in the session state until the IR is updated?

  • Export PDF of unique pages, spreads via Javascript

    Hello

    Thank you for taking the time to read this post. I am a beginner when it comes to scripts, so apologies if this is really simple.

    I tried the search all over the internet and even looked through the Adobe guides and can't seem to find what I'm looking for.

    I have put something in place in pairs printers, facing pages etc.

    Via Javascript, I can export in spreads.

    I also want to be able to export as single pages.

    for example PDF a range of pages to: 2,3,6,7,8,5,4,1

    Do it manually, I simply change the export for the below settings:

    Screen Shot 2016-05-24 at 1.08.31 pm.png

    How can I do this via Javascript?

    Thanks in advance.

    I don't think you can do like this.

    you apply app.pdfExportPreferences.exportReaderSpreads = false

    and after this you applying parameters of your "e-mail", who have the option to export as the pasta spread and settings if I think well last will overwrite the previous one.

    In my view, that it will be easier for you to create 2 settings in indesign, recognize cases and apply search e.g. 'email_spreads' and 'email_singles' settings and control them with the button of your radio.

    Otherwise you should not apply predefine the indesign pdf presets and write all parameters in your script - in this case, you will be able to drive pages/how to export spreads

  • To hide multiple items via javascript or actions in case of different variable values - how?

    Note: I'm still Captivate 8

    The Question has 2 parts:

    (1) is there a possibility to hide (or show) of the elements via javascript instead of shares advanced? I think it would be a much faster workflow. I think of something as

    If variable1 < = 100 screenx.elemeta.hide;

    If variable1 < = 90 screenx.elemetb.hide.

    If variable1 < = 80 screenx.elemetc.hide;

    If variable1 < = 70 screenx.elemetd.hide;

    (2) if it is not possible... OK, I use advanced actions. But there is the 2nd problem: it runs only the first part of it when exporting in HTML5.

    See photo. I try to hide - or no - hide the 9 elements in case of different values in a Variable. Lets say that the value is "7". In se9 is Laura if the value is less than or equal 9 to hide the element ausw_se_10. This method works. In se8 is asket if the value is less than or equal 8 in order to hide the element ausw_se_09 - what you see in the image. This and the following mask does not work. I'm doing something wrong or is this a bug? And is there a solution?

    sc_2015_10_16_erweiterte_aktionen.jpg

    Showing and hiding are a relatively easy control if you use HTML5:

    CP. Hide ("element_name");

    If you want to hide as much as you describe, you would need a very strict naming convention and use a loop to hide items.

  • Is it possible to call actionscript from Javascript?

    Is it possible to call actionscript from Javascript without using the external Interface. The call comes from Javascript of Flash actonscript.

    Kind regards

    Yes. If you call a Javascript function that does not exist, you will get an error.

  • transform &gt; represent the objects in illustrator via javascript

    Hi all

    is there a way to transform > reflect the Vertical axis in illustrator, but via JavaScript not apple and I mean does not reflect the scale H or V

    Thanks in advance.

    Hi Muhammad.eloc,

    You can try something like this:

    var totalMatrix = app.getScaleMatrix(-100,100);
    app.activeDocument.activeLayer.pathItems[0].transform(totalMatrix);
    

    for example the first element of the path in the active layer

    Have fun

  • Cannot export interactive pdf via javascript

    Hi we are generating PDF with the link url in it, if we want to use type PDF interactive to export our PDF via javascript, however, when we use below the function exportfile, it throws error:

    DOC.exportFile (ExportFormat.INTERACTIVE_PDF, leader (pdfFile));

    Output console: result: Script Exception: object does not support the property or method 'INTERACTIVE_PDF '.

    We use CS5.5 (7.5) and it works when changing ExportFormat to:

    DOC.exportFile (ExportFormat.pdfType, File (pdfFile));

    Please help.thank you.

    Make sure your app.scriptPreferences.version is set on CS5.5 (= 7.5)

  • return two values of columns via Javascript

    For the same purpose as:

    OnClick = "$s ('P1_DEPTNO', #DEPTNO #); return false; »

    to return a value from column via javascript, is it possible to return 2 values? Example:

    OnClick = "$s ('P1_DEPTNO', #DEPTNO #); $s ('P1_EMP, #EMPLOYEE #); return false; »

    Thank you all :)

    Max

    Maxime Carrier wrote:
    Sorry for the wrong question form, I'm not an English speaker, so I try my best to make sentences clear.

    My goal is like this in this issue: Insert the value of a column in the report in a page with JavaScript element - 2?

    My Apex version is: 4.0.2.00.06
    My DB is: Oracle 11G
    My browser: IE 7

    I'm trying to save two values when I click on a link in a report. I will use these values in which the declaration of another report. The content of the second report will depend on the link I clicked in the 1st. It will change dynamically without reloading the entire page.

    Standard or interactive report?

    Where is the defined link? Column link IR? The column link? HTML embedded in the report query?

    One of the two values is not a number.

    Use quotes around chains of substitution of the column as shown above.

  • How can I trigger "Add tags to the document" via JavaScript?

    How can I trigger "Add tags to the document" via JavaScript? I am trying to add this fuction ITextSharp if when the user opens the pdf it could mark the document once it is opened automatically

    Is not possible.

  • Is there a method to add a field of barcode via Javascript?

    I think I did a reasonably diligent search and I can't find information on how a barcode field can be added to a PDF file via javascript.

    My Excel-based application generates a series of documents in PDF format (based on user feedback) and I would like to add a bar code field to some of them. I can't add the barcode manually field because PDF files don't exist as user-initiated.

    I considered adding the fields to my MS Word templates, but it seems that we did not support which is integrated.

    Back to my question... is there not a way to add a field of barcode in a PDF file programmatically?

    Thank you.

    It isn't documented, but you pouvez add a barcode field using the addField

    method. Simply specify the cFieldType parameter in the 'bar code'... The rest of

    the parameters are the same.

  • How can I add a watermark via JavaScript which includes the current timestamp?

    Part of my daily work process here is to analyze in a huge stack of incoming mail. I then OCR scans, delete the white pages and add a watermark. I have a batch set up for the first two steps, but I can't make a watermark for the datestamp himself and had to do so via JavaScript, but I a luddite-level understanding of it.

    Right now, these are my settings that I use to add the timestamp:
    datestamp field.jpg

    What I want to do is to run a script to do the same and insert the date of the day I mm-jj-aa currently, but I don't have the first clue of where to start. Any help you could provide would be very appreciated

    You can use the method doc.addWatermarkFromText () as a step in JavaScript in Action.

    for example

    var dt = new Date();

    stoday var = (dt.getMonth () + 1) + '-' + dt.getDate () + '-' + dt.getFullYear ();

    this.addWatermarkFromText({)

    cText: 'Deposit\r' + stoday,.

    nTextAlign: app.constants.align.right,

    nHorizAlign: app.constants.align.right,

    nVertAlign: app.constants.align.top,

    nHorizValue:-72, nVertValue:-72

    });

    See the SDK help files for more information on what do all the settings.

  • Setting opacity object via JavaScript

    Hello

    one last thing: I'm trying to adjust the opacity of the object of a framework of text via JavaScript (39%).

    Screen Shot 2012-10-19 at 23.27.25.png

    Unfortunately, I can't find the right code for this (I scanned the Jongware object model viewer but this part seems to be a bit tricky). Any ideas?

    Thanks in advance.

    See you soon

    Solved

    text_frame [i].transparencySettings.blendingSettings.opacity = 39;

  • Elements of targeting via javascript... How?

    Here is the code for a navigation menu where only option seems lit at a time (based on the code sent to me by the amazing Jon Fritz II).

    CSS:

    a button0 #, a {#button1

    Display: block;

    float: left;

    Width: 55px;

    height: 67px;

    margin: 0;

    }

    a button0.inactive #.{background: url(/carousel_home.png)-55 0 non-repetition}
    a button0.active #.{background: url(/carousel_home.png) 0 0 non-repetition}
    a button1.inactive #.{background: url(/carousel_vip.png) - 0 non-repetition 55px}
    a button1.active #.{background: url(/carousel_vip.png) 0 0 non-repetition}

    HTML:

    < a href = "#" onclick = "changeClass (this) ' class = 'inactive menu' id = 'button0' > < / has >"

    < a href = "#" onclick = "changeClass (this) ' class = 'inactive menu' id ="button1"> < / a >"

    JSCRIPT:

    < script >

    function changeClass (elClass) {}

    var divsLength = document.getElementsByClassName("menu").length;

    for (i = 0; i < divsLength; i ++) {}

    document.getElementsByClassName ("menu") [i] .className = 'inactive menu ';

    }

    elClass.className = 'active menu ';

    }

    < /script >

    What makes that swap the class of a button clicked (in a menu), returning all the other buttons to their original state, where only 1 button appears "informed" at the same time. The a tags are used as block elements that simply change the background image to produce a State "enlightened" and "off".

    My question is via javascript (or something else), is it possible to change class trigger for buttons in a region outside of the menu? In other words, we can do a link text on the page itself trigger which button in the menu 'light '. Something like < a href = "javascript:slide('div1'); JavaScript: (go turn on button1) "> example < /a >"

    The reason is that this menu is not the ONLY way to go from one section to another. So if I click on a link in another DIV on the same page that takes me to another area, ideally, I would like to see the button that represents the area in the menu nav lights as it is clicked on - even if she didn't. And of course, the other buttons are NOT lit.

    Thank you!

    There is little difference between these two, although it could cause your page suddenly jump to the top (if the link is near the bottom, since the browser will interpret the link null as an anchor named to the top of the page.  The way to resolve this would be like that-

    link

    I prefer this format, but I don't know why.

    For the second problem, change this-

    something

    something2

    on this subject.

    something

    something2

Maybe you are looking for