I am reorganizing the attribute value using javascript. see code below

Hi all

I am reorganizing the attribute value using javascript. see code below and suggest me

EX: id = "to THE:1" reorganize to id = "to THE:2"

myDoc var = app.activeDocument;

var myGlueCodePath = app.filePath + "/ Scripts/XML rules/glue code.jsx";

var myFile = File (myGlueCodePath);

app.doScript (myFile);

If (app.documents.length! = 0) {}

var myRuleSet = new Array)

new findObjAttribute ("//auq")

);

{with (MyDoc)}

var elements = xmlElements;

__processRuleSet (Elements.Item (0), myRuleSet);

}

}

else {}

Alert ("you have no open documents!");

Exit();

}

function findObjAttribute() {}

myIdName = "findObjAttribute";

This.XPath = ("[/ / auq[@id]");

This.Apply = function (myElement, myRuleProcessor)

{

elmName = myElement var .markupTag .name;

{with (MyElement)}

try {}

var myAttName = myElement .xmlAttributes .itemByName ("id") .value;

SS var = myAttName.replace(/[A-Z]+\:/,""); "

var SSS = ss - 1;

myAttName = myAttName.replace(/[0-9]/,sss)

$.writeln (myAttName);

} catch (e) {};

}

}

}

Your code re - order the value correctly, but you don't have the update attribute in the element.

Try this,

myAttName = myAttName.replace(/[0-9]/,sss);

myElement.xmlAttributes.itemByName("id").value = myAttName;

Tags: InDesign

Similar Questions

  • Setting value using javascript on the form of tables created by APEX_ITEM

    I can assign the value using javascript on normal form of table as below:

    var vRow = pThis.id.substr (pThis.id.indexOf ('_') + 1);
    $x_Value ('f05_' + vRow, 'Value');

    However I can't do the same if the tabular presentation is dynamically created by APEX_ITEM.

    Some tips on how to do this?

    Thank you

    If this should not be something like:

    this.id.substring(4, 8)
    

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • How to read the value of the attribute XML using DBMS_XMLSTORE

    the following xml data

    + < ROWSET > +.
    + < ROW > +.
    + < > 2290 EMPNO < / EMPNO > +.
    + < SAL > 2000 < / SAL > +.
    + 31 December 1992 of < HIREDATE > < / HIREDATE > +.
    + < TYPE > +.
    + < ENO > 123456 < / ENO > +.
    + attr_name < ENAME > < / ENAME > +.
    + < / TYPE > +.
    + < / ROW > +.
    + < / LINES > +.

    The above XML data stored underneath table of the object using DBMS_XMLSTORE

    CREATE or REPLACE TYPE typ_dummy AS OBJECT
    (
    ENO NUMBER,
    Ename VARCHAR2 (100)
    );

    CREATE TABLE EMP
    (
    EmpNo VARCHAR2 (25).
    SAL NUMBER,
    HireDate DATE,
    Typ typ_dummy
    );


    DECLARE
    insCtx DBMS_XMLStore.ctxType;
    lines NUMBER;
    xmlDoc CLOB: =.
    ' < ROWSET >
    < LINE number = "1" >
    < SAL > 1800 < / SAL >
    < > 7369 EMPNO < / EMPNO >
    < HIREDATE > 27 August 1996 < / HIREDATE >
    < / ROW >
    < ROW >
    < > 2290 EMPNO < / EMPNO >
    < SAL > 2000 < / SAL >
    < HIREDATE > 31 December 1992 < / HIREDATE >
    < TYPE ENO = ENAME "123456" = "attr_name" / >
    < TYPE >
    < ENO > 123456 < / ENO >
    attr_name < ENAME > < / ENAME >
    < / TYPE >
    < / ROW >
    < / LINES > ';
    BEGIN
    insCtx: = DBMS_XMLStore.newContext ('emp'); -be saved context
    lines: = DBMS_XMLStore.insertXML (insCtx, xmlDoc);
    DBMS_XMLStore.closeContext (insCtx);
    END;



    but I don't know if the XML contains the attribute values for particular node means how to insert in the table (assuming the creation of the structure of the table)


    + < ROWSET > +.
    + < ROW > +.
    + < > 2290 EMPNO < / EMPNO > +.
    + < SAL > 2000 < / SAL > +.
    + 31 December 1992 of < HIREDATE > < / HIREDATE > +.
    * + < TYP ENO = ENAME "123456" = "attr_name" / > + *.
    + < / TYPE > +.
    + < / ROW > +.
    + < / LINES > +.

    You can declare the type of object like this:

    CREATE OR REPLACE TYPE typ_dummy AS OBJECT (
      "@ENO"   NUMBER
    , "@ENAME" VARCHAR2(100)
    );
    /
    

    Oracle will know that XML attributes must be mapped to attributes of the object.

    But personally, I would not use DBMS_XMLSTORE:

    INSERT INTO emp (empno, sal, hiredate, typ, eno, ename)
    SELECT empno, sal, hiredate, eno, ename
    FROM XMLTable('/ROWSET/ROW'
           passing xmltype(xmlDoc)
           columns empno    varchar2(25)  path 'EMPNO'
                 , sal      number        path 'SAL'
                 , hiredate date          path 'HIREDATE'
                 , eno      number        path 'TYP/@ENO'
                 , ename    varchar2(100) path 'TYP/@ENAME'
         )
    ;
    
  • [JS CS4/CS5/CS5.5] How to get the return value from Javascript using doScript

    Hi all

    I'm calling javascript from COM (c#) and it works fine. Passing parameters to javascript and playback by using the syntax of the [x] arguments also works very well.

    What I can't seem to get to work is to know how to move something from javascript to the calling COM Summoner, in this case, c#. How and where should I place the return value in javascript?

    Thanks in advance.

    Rachiud

    doScript() evaluates an expression, so just make sure that your Javascript is an expression.

    For instance "(3 + 3)" 6 "

  • How can we display - hide or enable - disable the Captivate objects using javascript?

    How can one show - hide or enable - disable or change the color of the Captivate objects using javascript?

    All ideas, actually I want to avoid Advance Action assisted drop programming and want to do the actions of text encoding.

    You can show/hide and activate using the following syntax.

    CP. Show ("obj." + i)

    CP. Hide ("obj." + i)

    CP. Enable ("obj." + i)

    CP. Disable ("obj." + i)

  • How to solve [' &lt; ' may not appear in the attribute value]

    Set the attribute value to inputText as follows:
    value="#{bean.newMode==true ? '<auto>' : bean.someValue}"
    but I got the error in the title.

    I tried to add a '-' before ' < ',.
    but still does not work.

    Thank you.

    Kevin.

    Try

     & lt; and & gt; 
    

    Remove the space after the &

    Timo

    Published by: Timo Hahn 25.06.2009 at 09:17

  • Hi, I installed an Alfred Workflow (see code below) that will mark all my mails as read. After you run it for a minute, the mail has crashed and I had to forcequit. However, now, when you open the Mail it crashes instantly, even after restart and repair o

    Hello

    I installed an Alfred Workflow (see code below) that will mark all my mails as read. After you run it for a minute, the mail has crashed and I had to forcequit. However, now, when you open the Mail it crashes instantly, even after restart and repair the permissions. I also used the Ctrl + C and CTRL-Z commands in the Terminal to leave the alfred_script, but nothing helped. I'm running out of ideas here, so I hope you could help me either reinstall the mail.app. I could always just switch to a different mail application, but it's kind of a last resort.

    Code:

    Tell application "Mail".

    Define allAccounts on each account name

    Repeat with currAccount in allAccounts

    the unreadMboxes value (each mailbox to the account currAccount the unread number is not 0)

    Repeat with currMbox in unreadMboxes

    (read status of each message to currMbox including the playback State is set to false) true value

    end repeat

    end repeat

    tell the end

    Any input would be greatly appreciated. Can post the report of crash on demand.

    Not sure that Alfred's, but it's just an Applescript script and it would not cause Mail to be planted.

    However, when running through all the messages, it is possible Mail database has been corrupted and it crashes because of this.

    I'll probably get anything out of the accident report, but others might.

    My first instinct would be to rebuild the mailbox. Because you can't do that with him crashing, you can simply delete the databases and it will rebuild them.

    Navigate to this folder:

    ~/Library/Mail/v3/MailData/

    You can either manually through the files, or copy the full path and paste it into go the folder in the menu go to the Finder.

    Remove the envelope Index files. Open Mail and see if it works well.

    If your library does not appear in your folder, hold down the Option key and select library in the menu go to in the Finder.

  • Cannot set attribute of the param element value using javascript in setAttribute

    When adding the items param via createFragment the javascript in setAttribute function does not set the "value" attribute It is necessary to set the nodetext to add this attribute to the value of the param element.

    Second, when using the method of the generated html code defines the 'value' to the innerHTML. HTML code resulting in the display by "Inspect the system" looks like this.

    < parameter id = "myID" > myValue < / param >

    Note: [the element close text < / param > is displayed correctly using inspect, but when using file-> SavePageAs the end text is not saved correctly.] I reported this in another question of moz. support FF.]

    function setparamAttrs (parmID, parmVal)
    {

    var gData = document.createDocumentFragment();
    
     var newNode = document.createElement("param");
     var textStr = document.createTextNode(parmVal);
     newNode.appendChild(textStr);
    
     newNode.setAttribute("id", parmID);
     //newNode.setAttribute("value", parmVal);  // this does not work
     //newNode.setAttribute("innerHTML", parmVal);  //this does not work
    
     gData.appendChild(newNode);
     document.body.appendChild(gData);
    

    }

    However, I was able to retrieve the "value", once it has been added using:

    var val = document.getElementById("parm0").value;)

    getAttribute ("value") does not work either.

    Finally, I added the param elements to my HTML code like this.
    < parameter id = "myID" > myValue < / param >. Then I tried to extract the value using document.getElementById("myID").innerHTML. No text has been returned. When I looked at the HTML document with inspect my HTML param element is displayed as < param id = "myID" > myVal. The closing text of the element has not the same when I use SavePageAs which I mentioned previously.

    Yes, this is the correct way to this code and it works for me without any problem.

  • Pass the value using javascript:modalpage()

    Hello

    Apex 4.2

    I need to know, is it possible to do the following.

    I have 4 buttons on the page as (Suspend, end, restoration, Add) and whenever you press a button and then MODAL_REGION will appear and I m using this javascript:openModal('Open_Page');

    within the action of the button - URL redirect for all the buttons. I did not create DAs for it as I create four DAs for each button.

    So my question is? I can pass the value in the code above. like javascript:openModal('Open_Page'); $s(P6_ITEM1,'S');


    but above does not work. I can just do a few DAs for him but don't want that for all buttons. Thus, when the press "SUSPEND" button hidden point P6_ITEM1 should take the of ' as a value, if the press which ENDED then take 'E' and so on.

    Please advice?

    Thank you very much.

    RI

    Hi Irha10,

    There is no need to use a DA to pass values to it. In the redirect URL

    javascript:$s('P6_ITEM','S');
    openModal('Open_Page');
    document.forms[0].P6_ITEM.focus();
    

    Hope this helps

    Kind regards

    Benjamin.

  • The attribute value set using plugins

    Hi Experts,

    I am confronted with error when you set the value of the attribute in the event "OnInvestigationStartedEvent". Any suggestion to solve the problem

    Code:

    Its session = onInvestigationStartedEvent.getSessionContext () .getInterviewSession () .getRuleSession ();

    Start of attribute = ses.getGlobalEntityInstance () .getEntity () .getAttribute ("test_start_time");

    Date start_date = new Date();

    start.setValue (ses.getGlobalEntityInstance (), start_date);

    Error:

    25750 [http-Apr-8080-exec-9] INFO com.oracle.determinations.engine.Session - setting test_start_time attribute, global entity, name of the world body, session 1 value user 21/07/13 14:17

    25752 [http-Apr-8080-exec-9] ERROR com.oracle.determinations.web.platform.templatingengine.ErrorRenderer - a change to the Session of the rule has been detected.

    com.oracle.determinations.interview.engine.exceptions.CorruptSessionException: an unauthorized at the Session of the rule changes was detected.

    at com.oracle.determinations.interview.engine.data.local.RuleSessionManager.checkSessionIntegrity(RuleSessionManager.java:760)

    at com.oracle.determinations.interview.engine.data.local.RuleSessionManager.getRuleSession(RuleSessionManager.java:144)

    at com.oracle.determinations.interview.engine.local.LocalInterviewSession.getRuleSession(LocalInterviewSession.java:203)

    at com.oracle.determinations.interview.engine.data.model.InterviewEntityInstanceIdentifier.findEntityInstance (InterviewEntityInstanceIdentifier.java:73)

    at com.oracle.determinations.interview.engine.local.AttributeGoal.getNextScreen(AttributeGoal.java:112)

    at com.oracle.determinations.interview.engine.local.LocalInterviewSession.getNextScreen(LocalInterviewSession.java:222)

    at com.oracle.determinations.web.platform.controller.actions.InvestigateAction.getResource(InvestigateAction.java:65)

    at com.oracle.determinations.web.platform.servlet.WebDeterminationsServlet.doGet(WebDeterminationsServlet.java:112)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at com.oracle.determinations.web.platform.util.CharsetFilter.doFilter(CharsetFilter.java:46)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)

    to org.apache.coyote.AbstractProtocol$ AbstractConnectionHandler.process (AbstractProtocol.java:589)

    to org.apache.tomcat.util.net.AprEndpoint$ SocketProcessor.run (AprEndpoint.java:1852)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.runTask (unknown Source)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)

    at java.lang.Thread.run (unknown Source)

    Thank you

    Vinay

    Vinay,

    When you work in an engine of the interview event handler, you can use objects of the engine of the Interview to set the values. Take a look at the example 'use of the OnInterviewSessionCreatedEvent to start in a session data newly created' in the 'the Oracle policy Automation Developer's Guide'.

    Your code should look like:

    get the globalInstance of a new InterviewUserData;

    Data InterviewUserData = new InterviewUserData();

    InterviewEntityInstance globalInstance = data.getGlobalInstance ();

    the value of the test_start_time

    Date start_date = new Date();

    globalInstance.setValue ("test_start_time", start_date);

    submitting data to the session of the interview.

    Result TransactionResult = session.submit (data);

    I hope this helps.

    See you soon

    Frank

  • Get the attribute value of a def page table by using el expression.

    Hello

    Use Jdeveloper 11.1.2.0.0 and have a requirement like this for which a sample is created. Requirement is as follows...

    1. do you have a Taskflow with a readonly employee table.
    2. by clicking on a button called "itinerary" checks if the selected line, the attribute Manager id value = 200 then go to the first page on the other if the value attribute id manager is 200 then go to the second page.


    Through the def page, if it has the form, then we can access the attributes like #{data.view_FirstPageDef.ManagerId}. In the case of acquisition of the same attribute value from the table using the def page? is what I am unable to get...

    Come to the notion of routing using the router on Taskflow activity. But I am unable to get the selected row in a table of employee page def attribute value. Can anyone suggest on the same...


    Thank you and best regards,
    Olivier G

    On the router, right-click on its icon in the workflow and create a page definition. Then in the file def, add an iterator based on the same view of the table object in the first page, then add a value attribute that is mapped to the managerId in the iterator of the View object. Finally in the router, you can write EL expressions along the lines of #{bindings. ManagerId.inputValue = 200} or #{bindings. ManagerId.inputValue! = 200}.

    CM.

  • How to get the value of the global element using javascript or ajax!

    Hello!

    How can I read at global(point application created in the shared components) using ajax or javascript?
    You can imagine that I need to get the value of this element by function as:
    -----
    Function getText() {var itemVal = $x ('MY_GLOBAL_ITEM') .value;}  Return itemVal; }
    -----
    .. .but I can't do it because it is not made to couse of the page it is global element! so, anyone know no work around to do?
    I know that I can make point page and read the value of that, but not what I really need!
    If I have 100 pages and all pages need to use my function, it would take 100 Articles :) - that's why its no good average!

    Please, share your ideas!

    THX

    Rafix,

    You must use a little AJAX to retrieve a request element value. Three steps in this solution. Implementation of a callable JavaScript function, creating an application process on the request and call the JavaScript function with dynamic action.

    1 set up a JavaScript function that can be called by:

    This function calls the process of application level which has a visibility of the element of your application and then returns the value of points.

    Edit your page and JavaScript code according to the code in the 'function and Variable global statement' of your page. You can also add to the model page, that you use, but you also have to encapsulate this code in the script tags.

    getAppItem = function(pItemName){
        var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=GET_APP_ITEM',$v('pStepId'));
        get.addParam('x01',pItemName);
        gReturn = get.get();
        get = null;
        return gReturn;
    }
    

    2. creating an application on request process:

    The application of level process has visibility to your application-level element. It is to retrieve the value of points and it prints the htp buffer. Essentially, this acts as a way to return the values of AJAX calls (the javascript function we set previously);

    go to the shared components > procedures > Create.

    Point process: "We Demand: run this application...". »
    Name: GET_APP_ITEM
    Type: Anonymous PL/SQL block

    declare
       -- get the item name passed into the JavaScript function.
       app_item_name varchar2(30) := apex_application.g_x01;
    begin
        -- print its value to the buffer
        htp.p(v(app_item_name));
    end;
    

    3. call the JavaScript function with dynamic action:

    The function call allows to specify an application-level element name and have its returned value. The trigger event is specific to what you need, but the action must be of type to run JavaScript code. In my case immediately the value of P1_NUMBER to my value of demand points. This code doesn't have to be in a dynamic action, but it helps to stay organized. you could call it from any script tag.

    $s('P1_NUMBER',getAppItem('MY_APP_ITEM'));
    

    See you soon,.
    Janet Tyson

  • Get separate paths and the depth attribute value using the XQuery function

    Hi otn.
    I want to write the function XQuery that accept the following input document nodes.

    < counter Root = "8" >
    < has counter = "3" >
    < meter B '2' = >
    < C meter = "1" >
    < meter D = "1" / >
    / < C >
    < /B >
    < C meter = "2" >
    < counter E = "1" / >
    / < C >
    < /A >
    < meter B = "4" >
    < C meter = "3" / >
    < /B >
    < C meter = "6" >
    < counter E = "3" / >
    < counter D '2' = >
    < counter E = "1" / >
    / < d: >
    / < C >
    < meter D = "2" / >
    < counter E = "4" >
    < counter F = "1" / >
    < /E >
    < counter F = "1" / >
    < / root >

    Then returns many things at the same time as follows:
    1 - list of all of the separate paths
    2 - meter of the depth of each path element attribute value
    3 - the value of the previous counter in 2, is divided by the value of the attribute root counter.

    Thanks in advance :)))

    I'm sorry that not all xml input data correctly.

    You must use the {code} tag to enclose the code snippets. Formatting will be preserved and content not interpreted by the forum software.

    
      
       
        
         
        
       
       
        
       
      
      
       
      
      
       
       
        
       
      
      
      
       
      
      
    
    

    Here's an XQuery query that should work:

    declare function local:list-paths($d as element())
    as element()*
    {
      let $root := name($d)
      let $rootcnt := xs:integer($d/@counter)
      for $i in $d/descendant::*
      return element path
      {
        attribute value {
          substring-after(
            string-join(
              for $j in $i/ancestor-or-self::*
              return name($j)
            , "/"
            )
          , $root
          )
        }
      , attribute counter {$i/@counter}
      , attribute percentage {xs:integer($i/@counter) div $rootcnt}
      }
    };
    
  • Cannot retrieve the value of the attribute by using ExtractValue

    Hello
    can't extract the AddressDetails accuracy value using the following syntax:

    SELECT extractValue (VALUE (r), ' / answer/cue [1] / Point/coordinates ", namespace),
    extractValue (VALUE (r), ' / Response/Placemark[1]/AddressDetails/@Accuracy', namespace)
    IN coordinates,
    precision
    TABLE (xmlsequence (extract (' geocode_xml, ' / kml/response ", namespace))) r;


    namespace: = 'xmlns = "http://earth.google.com/kml/2.0" ';

    <? XML version = "1.0" encoding = "UTF-8"? >
    < kml xmlns = "http://earth.google.com/kml/2.0" >
    < response >
    < name > 333 THIRD AVE, ANYTOWN, ST 99999 < / name >
    < status >
    < code > < code > 200
    geocode < application > < / request >
    < / status >
    < benchmark id = "p1" >
    < address > 3rd St, Anytown, St 99999, USA < / address >
    < AddressDetails precision = "6" xmlns = "urn: oasis: names: tc: ciq:xsdschema:xAL:2.0" >
    < country >
    < CountryNameCode > U.S. < / CountryNameCode >
    < CountryName > USA < / CountryName >
    < AdministrativeArea >
    St < AdministrativeAreaName > < / AdministrativeAreaName >
    < SubAdministrativeArea >
    < SubAdministrativeAreaName > some County < / SubAdministrativeAreaName >
    < location >
    < LocalityName > any city < / LocalityName >
    < artery >
    < ThoroughfareName > 3rd St < / ThoroughfareName >
    < / artery >
    < ZipCode >
    < PostalCodeNumber > 99999 < / PostalCodeNumber >
    < / code >
    < / location >
    < / SubAdministrativeArea >
    < / AdministrativeArea >
    < / country >
    < / AddressDetails >
    < ExtendedData >
    < LatLonBox = "46.5846776" North South = "46.5783824" is = '-112.0202820"West ="-112.0366410"/ >
    < / ExtendedData >
    < point >
    coordinates of <>- 112.0281180,46.5815400,0 < / data >
    < / point >
    < / mark >
    < / answer >
    < / kml >


    Thanks in advance for the help!

    You have the part of the question of the namespace which tends to travellers to the top, but you missed the fact that AddressDetails is in a different namespace (default).

    Here is an SQL statement, with all hard-coded, which returns the value of the attribute you need. I had to add the namespace prefix so that the parser know which namespace of each element was.

    SELECT extractValue(VALUE(r), '/Response/Placemark[1]/Point/coordinates', 'xmlns="http://earth.google.com/kml/2.0"'),
    extractValue(VALUE(r), '/ge:Response/ge:Placemark[1]/oa:AddressDetails/@Accuracy', 'xmlns:ge="http://earth.google.com/kml/2.0" xmlns:oa="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"')
    FROM TABLE(xmlsequence(extract(XMLTYPE('
    
    
    333 THIRD AVE, ANYTOWN, ST 99999
    
    200
    geocode
    
    
    
    3rd St, Anytown, St 99999, USA
    US USA St Some County Any Town 3rd St 99999 -112.0281180,46.5815400,0
    '), '/kml/Response', 'xmlns="http://earth.google.com/kml/2.0"'))) r;

    Note: If you are on a version that supports XMLTable, I suggest to use. Easy to use, especially if you are using the COLUMNS option to pull data as fields then you need not to use extractValue in the SELECT part. I just made an example on {message identifier: = 3646323}

  • How to validate the field "Reason for change" in the commercial indications using JavaScript?

    How to validate the field "reason for change" in the commercial directions Summary tab using JavaScript?

    Current version of PLM4P: v6.1.1.5.2

    Please help me to validate the fields using JavaScript.

    Thank you

    Nefertari

    Developed using some of the Javascript predefined functions that we offer, it's just JavaScript and jQuery.

    But here is an example.

    (Use Internet Explorer F12 developer tools to find the IDS of the fields to work with.)

    $(document).ready(function() { 
    
        if (UI_Ext_isSpecInEditMode && UI_Ext_HasWorkflowBehavior('1005'))
        {
           //normally, we can use jquery to retrieve elements ($('#ifOfInput).val()), but it seems to fail when the id and the name attributes are the same. so we just use javascript document.getElementById instead.
           var reasonForChange = document.getElementById('ctl01$SpecSummaryctl1$ctlCollapsibleContentContainer$ctl00$txtChangeReason')
    
           if (reasonForChange != null) { 
    
                if (reasonForChange.value == null || reasonForChange.value.length == 0) {
                     UI_Ext_MarkFieldAsRequired('ctl01_SpecSummaryctl1_ctlCollapsibleContentContainer_ctl00_lblSpecSummaryReasonforChange');
                     alert('Reason For Change is required');
                }
           }
        }
    }); 
    

    However, not the user registration or workflow specification. If you were to do this, you must remove record them and workflow buttons and links, and this probably isn't the best practice. On the contrary, you would write validation server that would give you this error message if they try to save/workflow. (So most customers do not use Extensions of the user interface for this type of validation).

    Kind regards

    Ron

Maybe you are looking for

  • Want 4524: hp envy 4524 DNS Gateway problem

    Hello eveyone!  Please help technically challenged, very frustrated new Member! I want to HP 4524, but I have enormous problems trying to keep connected to instant ink, and I am now getting the message that my impression is off unless I connect. Prev

  • Twitter share only the text

    Hi all This code that I use for the tweet on twitter below... _socialInvocation.Invoke ("Twitter", "bb.action.VIEW", "text/plain", "a: / /"); When I use this... a: text / / is also visible in the text box and also it is shared in twitter... I need to

  • BlackBerry Smartphones Facebook notifications

    Hello... I have already disabled the option "Application BlackBerry Message" inside my facebook app, but I receive invitations to unnecessary events and also personal messages from facebook. I don't want to receive this kind of things, I only want to

  • After effects + Trapcode Mir = crash

    Machine features:10 64-bit WindowsCPU AMD 835032 GB of ram 1600 mhz7870 x 2 AMD in x-Fire (latest drivers / purple)1200 watt POWER supplyApplication:After Effects Cs5 10.0.2The error:Name of the failing application: AfterFX.exe, version: 10.0.2.4, ti

  • Unable to charge sync cable