Adding Custom Javascript for disabling metadata field

Hi,
I have a metadata field as option list and based upon its selection i need to enable/disable 2 other metadata fields.
I'm stuck where to include the javascript for the same.Can anyone provide pointers for the same.

Hi All,
I 'm able to disable the 2 metadata upon selection of the option list metadata using the following code:
<@dynamichtml std_js_bootstrap_vars@>
<$include super.std_js_bootstrap_vars$>
<$if IsLoggedIn$>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
     <script type="text/javascript">
     $(document).ready(function(){
     $('tr.idcRowClass-xlanguage td select').change(function() {
     var selectedVal = $('tr.idcRowClass-xlanguage td select option:selected').val();
          if(selectedVal !== "en-US"){
          $('tr.idcRowClass-xConvert td select').attr('disabled','disabled');
          $('table#Languages-Checkbox tr td input[type=checkbox]').attr('disabled','disabled');
                         </script>
<$endif$>
<@end@>

Similar Messages

  • PDF Form javascript for making readonly field by using button

    Please let me know the PDF Form JavaScript for making selected fields(Text field,Drop down list,..) as read-only by using Button.

    Do you want your button to be made read only?
    One starts with Acrobat JS Reference.
    // make all fields in a form read only;
    var oField; // variable for field being processed;
    // loop through the form fields;
    for (var i = 0; i < this.numFields; i++) {
    // process each field name;
    oField = this.getField(this.getNthFieldName(i)).readonly = true;

  • Problem in adding Custom Provider for Work Management Service

    Hello,
    I'm facing an issue in adding custom provider for work management service. As you are aware, Work management service is a Provider model and we
    can integrate with other systems by adding custom providers. So with that confidence, i have started writing a connector as mentioned below.
    Step - 1: Added new provider xml in the below path
    "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\CONFIG\WorkManagementService\Providers"
    Provider Name: provider.bizagitasklist
    Provider XML Content: 
    <Provider ProviderKey="DAA52AF3-A147-4086-8C0C-82D2F83A089D" OverrideProviderKey="" Assembly="adidas.TaskProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5d6f3e6be60a351b" > </Provider>
    Step -2: Added a class which inherits "IWmaTaskProvider" and implemented the override methods.
    public class BizAgiTaskListProvider : IWmaTaskProvider
    public string LocalizedProviderName
    get { return "BizAgiTaskListProvider"; }
    public string ProviderName
    get { return "BizAgiTaskListProvider"; }
    public Microsoft.Office.Server.WorkManagement.CalloutInfo GetCalloutInfo(IWmaTaskContext context, string taskExternalKey, string locationExternalKey)
    return null;
    public DashboardExtensionInfo GetDashboardExtensionInfo(IWmaBasicProviderContext context)
    return new DashboardExtensionInfo { ClassName = "SP.UI.SharePointExtension" };
    public BulkEditResult HandleBulkEdits(IWmaTaskContext context, BulkEdit updates)
    return null;
    public TaskEditResult HandleTaskEdit(IWmaTaskContext context, BaseAggregatorToProviderTaskUpdate taskUpdate)
    return null;
    public void RefreshSingleTask(IWmaTaskRefreshContext context, string externalKey)
    public void RefreshTasks(IWmaTaskRefreshContext context)
    //context.WriteProviderCustomData(
    Step – 3: Written a class to fetch the tasks from BizAgi System which has method to provide the task data.
    But I’m not able to feed those tasks in the class written in Step – 2 as I’m able to find any method which will take Tasks as Input and I’m not
    sure about the format of tasks.
    I’m able to debug the provider, and the breakpoint hitting in only one method and two properties.
    (LocalizedProviderName, ProviderName, GetDashboardExtensionInfo).
    Can you please help me to proceed further in implementing the above solution?
    Best Regards
    Mahesh

    Hi Mahesh,
    Although the implementation of work management service application is based on the provider model, I reckon the current SP 2013 RTM does not support custom providers. Only SharePoint task lists, Project server and MS Exchange are supported for now.
    Regards,
    Yatin

  • How to generate unique IDs for a metadata field

    Hi,
    We have a requirement to generate a unique ID for a metadata field. Does anybody know how this can be achieved? Ideally I would want to have a database sequence and specify the metadata field to get value from this database sequence, similar to how Content ID is generated.
    Any help is appreciated. Thank you in advance.
    Regards,
    Tim

    Look into the Counters table. You should be able to create a component install filter to add in your field to the Counters table.
    You could then create some Java code to fetch the next value from the Counters database for your field (and increment the value).
    Jonathan
    http://redstonecontentsolutions.com
    http://corecontentonly.com

  • The JavaScript for my form field does not run

    I am running Windows XP and have Adobe Acrobat 9 Pro installed. I am using the Wizard to create a form. For a particular field I need to run a JavaScript.
    1. For "Select Trigger", I selected, "Mouse Up".
    2. For "Select Action", I selected, "Run a JavaScript".
    I then added the very simple JavaScript, below.
    if (qty < 12) {
        discount = 0;
    } else {
        discount = shipping * 0.1;
    However, it did not work, as expected. After spending more than a day trying to figure out why it does not work, I realized that the reason it did not work was because the value of "Select Action" is not being retained. It just returns to "Execute a menu item" ... even if I check the "Locked" checkbox. Please help me.
    Thank you, in advance.
    Fay

    I am not doing a calculation. Unfortunately, this cannot be done because I have an "IF" condition. This is why I am utilizing the "Action" tab NOT the "Calculate tab. Please see the screen shots below:
    Action Tab
    Calculate tab
    My JavaScript is:
    if (qty < 12) {
        discount = 0;
    } else {
        discount = shipping * 0.1;
    There is no way that I could execute it as a calculate.
    Anyway, I will take a look at the Thom Parker link that you sent to me. Thanks for your help.

  • Javascript for multiple date fields

    Hi all-
    I have to write javascript for 15 different date fields in a form.
    The requirement here is that we convert all date fields on Page 100 from date pickers (editable date fields) to display-only date fields with two controls for the users to set the date.
    If the field is empty (no date registered yet), there will be a green checkmark(X). When the user clicks this checkmark, the current date is entered into the field.
    If the field is not empty (there is a date already in the system), there will be a red X. When the user click this red X, the date from the date field is removed.
    The javascript I am using here is
    </script>
    <script type="text/javascript">
         function init(){
              var datePickerVal = $v2('P100_TODAYS_DATE');
              if(datePickerVal){
                   $x_Show('ToggleDateR');
                   $x_Hide('ToggleDateG');
              }else{
                   $x_Hide('ToggleDateR');
                   $x_Show('ToggleDateG');
         function toggleDateFunc(pValue){
              var sysDate = $v2('P100_DATE');
              if(pValue == 'R'){
                   $x_Hide('ToggleDateR');
                   $x_Show('ToggleDateG');
                   $x_Value('P100_TODAYS_DATE','');
              }else if(pValue == 'G'){
                   $x_Show('ToggleDateR');
                   $x_Hide('ToggleDateG');
                   $x_Value('P100_TODAYS_DATE',sysDate);
         window.onload = init;
    </script>
    This javascript is working for one date field( 'P100_TODAYS_DATE') but i have 15 different date fields in this page(100) all should have same funtionality. Please help me out how to write a logic to use this function for all the date fields.
    Thanks,(apex 3.2)
    Greenhorn
    Edited by: Greenhorn on Jul 19, 2011 12:30 PM

    Hi,
    You can do the needful by re-using the code if you can give the item names as P8_DATE1, P8_DATE_hh1, P8_DATE2, P8_DATEhh2 etc..So your item name just differs by a sequence.
    Now you write function which will return desired date value taking above items as input. Pass item names to this function, get session state using APEX_UTIL.GET_SESSION_STATE('item_name') API.
    Now modify you code as
    FOR i IN 1..30
    LOOP
    v_date_array[i] = f_get_date('P8_DATE'||i, 'P8_DATEhh'||i);
    END LOOP;
    ....Now you have all date valus in array. Just write one update as follows
    UPDATE  TABLE1
    SET date1 = my_date_array[1], date2 = my_date_array[2]..
    WHERE ....Hope it helps :)
    Cheers,
    Hari

  • Browse function for new Metadata field

    Hi
    In UCM Content Server, is there a way to add a "Browse" button to desk top or a custom search for a new Meta data field similar to "Primary File" ? All my research shows examples of static drop down list.
    Any help would be greatly appreciated.
    Thanks

    Thanks for the reply.
    My idea was to mimic the functionality of "Primary File", the meta data field with the "Browse" functionality to the desktop. I want to add an image meta data field to the "Check In" form. I don't want to use the Inbound Refinery image but a image that can be posted with a News document.
    Thanks for the help.

  • JavaScript for disabling htmlb elements

    Hello,
    in my bsp application i want to change the attribute disabled of htmlb:inputfields and htmlb:dropdownlistbox. I used following javascript:
    document.getElementById('controllerID_inputfieldID').disabled = 'true';
    document.getElementById('controllerID_inputfieldID').disabled = '';
    This isn't work right, because the disabled is displayed other than I set disabled in the htmlb tag (<htmlb:inputField id = "inputfieldID" disabled = "true") and I can choice a element in the dropdownlist.
    What is the correct javascript function for disabling htmlb elements?
    Tina

    I believe that the following will work for you, although I must caution that it is not likely supported by SAP. Any service pack upgrade or patch may break this code. Use at your own caution.
    This is from a function that can disable or enable different objects using Javascript. Setting the st attribute seems to be what it takes to make it readOnly. Setting the class just applies the disabled look.
          case "DROPDOWN":
            switch(mode)
              case "DISABLED":
                window.document.getElementById(ID).st = "r";
               window.document.getElementById(ID).className = "urCoB2TxtDdl urCoB2Ro";
                break;
             case "ENABLED":
                window.document.getElementById(ID).st = "";
                window.document.getElementById(ID).className = "urCoB2TxtDdl";
               break;
           break;

  • Adding custom javascripts into my jsp pages

    Hi all,
    it will seems to be a newby question, i'm sorry i begin using jhs since two weeks
    the question is how can i Allow an onBlur property on VO Attributes; this property includes a piece of JavaScript to be executed on leaving the item to be generated in my jsp pages to prevent doing this in post-generation, by the way i would like to know who is the class responsible for the generation of form.js .
    thanks a lot
    best regards.
    Edited by: user1718070 on 3 févr. 2009 06:41

    Hi EvertJan, thanks for the reply.
    I need an advice:
    i've added an onblur event to jhsgenerator ADF BC property and i write as an example this.value=null
    i created a template in jspinput.xsl(JAGLauncher.jar) like this:
    <xsl:template name="onBlur">
    <xsl:param name="onBlur" />
    <xsl:if test="$onBlur !=''" >
    <xsl:attribute name="onblur">
    <xsl:value-of select="$onBlur" />
    </xsl:attribute>
    </xsl:if>
    </xsl:template>
    and i try to generate a html:text by modifing inputtextsec template like this:
    <xsl:template name="textInputSec">
    <xsl:param name="name"/>
    <xsl:param name="property"/>
    <xsl:param name="withIndex"/>
    <xsl:param name="size"/>
    <xsl:param name="maximumLength"/>
    <xsl:param name="updateable"/>
    <xsl:param name="displayType"/>
         <xsl:param name="onBlur" />
    <html:text name="{$name}" property="{$property}" size="{$size}" maxlength="{$maximumLength}" onblur="{$onBlur}">
    <xsl:call-template name="onBlur" >
    <xsl:with-param name="onBlur" select="$onBlur"/>
    </xsl:call-template>
              <xsl:if test="$withIndex = 'true'">
    <xsl:attribute name="indexed">
    <xsl:value-of select="'true'"/>
    </xsl:attribute>
    </xsl:if>
    <xsl:call-template name="disabledAttribute">
    <xsl:with-param name="updateable" select="$updateable"/>
    </xsl:call-template>
    </html:text>
         </xsl:template>
    also added this to CreateFormElement template in jsplibrary.xsl:
    <xsl:with-param name="onBlur" >
    <xsl:call-template name="getCustomProperty">
    <xsl:with-param name="entityAttribute" select="$entityAttribute"/>
    <xsl:with-param name="propertyName" select="'ON_BLUR'"/>
    </xsl:call-template>
    </xsl:with-param>
    but the result inemployees.jsp is not what i expected:
    <td class="prompt" nowrap="nowrap">FirstName</td>
    <td nowrap="nowrap">
    <html:text name="EmployeesBean" property="EmployeesFirstName" size="20" maxlength="30" onblur="" />
    </td>
    like yousee this.value=null is missing in onblur=""
    i hope you can help me
    Best regards

  • Adding custom text besides selection screen field

    Hi All,
       I need to add some custom text to the selection screen field "CtegoryID" in the Product search screen(thru the link "Internal Goods")....I sthis possible thru change os some template?If yes,which one??
    Regards,
    Disha.

    Well...
    I don't remember an existing search help with some fields using a combo-box.
    In the FM assigned to the search help (the search help exit), you can pre and post process some data.
      IF callcontrol-step = 'PRESEL', 'SELONE', 'SELECT'.....
    But I don't see anything for seach a feature.
    In conclusion, I don't think this is supported by generic search help.
    Rgds
    Christophe
    PS: please reward points for helpfull answers

  • Adding custom link for CIM Agent Console

    Hello all,
    I have a received a request to add a new custom button in the Information pane of CIM Agent console.The agents want to use this to show a drop-down with skillgroup/queues and then transfer the activity to the selected skill-group.
    Can anybody advise how this can be achieved?
    Thanks much,
    Dilip      

    Restating the question:
    For the CIM agent desktop we want to add a new button in the  “Information Pane” where we can get a window to transfer the activity .  We want get a list of skillgroup and be able to transfer the activity to  the selected skillgroup or queue.
    I would like to  get information on if there is a developer’s guide or a configuration  guide that provides us any more information on how we can achieve it.
    Currently,  my information is limited to how a new button can be created and how an  URL can be added as provided in the attached document (Tools user  guide) and how the DataAdapter can be used.
    Thanks for your time.
    Regards,
    Dilip

  • Adding Custom Breadcrumb for SharePoint 2013 Custom Master-Page With A Custom Separator.

    Hi All,
    I have successfully converted an HTML file to a SharePoint 2013 Custom Master-Page with relevant style sheets. But when I used within the SharePoint site I could not find the breadcrumb. So I want to know how to do that? For that breadcrumb I need a custom
    separator like an arrow like in the below.
    As you can see the separator is a custom built one. To have this custom separator in my HTML I have used the following code snippet.
    <div class="breadcrumb-desktop">
    <span class="breadcrumb-links"><a href="#">SharePoint Site Home</a></span>
    <span class="breadcrumb-links"><a href="#">Sub Link 01</a></span> Active Page
    </div>
    The styles are as like in the below.
    .breadcrumb-desktop {
    width: 100%;
    font-family: Arial;
    padding: 23px 0 40px;
    float: left;
    font-size: 0.75em;
    line-height: 1.25;
    .breadcrumb-desktop > span.breadcrumb-links:after {
    content: " \203A ";
    white-space: pre;
    I have tried the following code snippet within the SharePoint site as
    <!--MS:<asp:sitemappath runat="server" sitemapproviders="SPSiteMapProvider,SPXmlContentMapProvider" rendercurrentnodeaslink="false" hideinteriorrootnodes="true">-->
    <!--ME:</asp:sitemappath>-->
    But it did not display as I wanted.
    So how am I supposed to insert these to my Custom Master-Page's breadcrumb and style them? Please could someone help me to solve this?
    Thanks and regards,
    Chiranthaka

    Hi Chiranthaka,
    Please use the following code snippet in your html master page.
    <div class="CustomBreadcrumbs">
    You are here:
    <!--SPM:<SharePoint:AjaxDelta id="DeltaPlaceHolderPageTitleInTitleArea" runat="server">-->
    <!--SPM:<asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">-->
    <!--MS:<asp:sitemappath runat="server" sitemapproviders="SPSiteMapProvider,SPXmlContentMapProvider" rendercurrentnodeaslink="false" hideinteriorrootnodes="true">-->
    <!--ME:</asp:sitemappath>-->
    <!--SPM:</asp:ContentPlaceHolder>-->
    <!--SPM:</SharePoint:AjaxDelta>-->
    </div>
    Here is a thread for your reference:
    https://social.msdn.microsoft.com/Forums/office/en-US/daabd903-df98-41da-80d8-6a942d06980e/add-breadcrumb-to-custom-master-page-html-file?forum=sharepointcustomization
    We can also customize a breadcrumb control, then add it in master page.
    http://msreddysharepoint.blogspot.com/2013/01/custom-breadcrumb-navigation-in.html
    Best Regards
    Dennis Guo
    TechNet Community Support

  • BADI for Disabling NetPrice field in ME21N & ME22N based of Material Type.

    Hi.
    I had a requirement to disable "net price" field while creating or changing a PO (ME21N & ME22N) based on the type of material entered.
    Please asssit me in finding the BADI or exit name which can meet my requirement. Thanks.

    Hi Ranga nadh,
       The BAdi what you have mentioned is correct.
    ME_PROCESS_PO_CUST - In this BAdi, we are having a method PROCESS_ITEM. These method is used to process all the Item data. As the field Netprice is at the level. You can use this method.
    Here inside this method we are having a parameter IM_ITEM
    So, You create a implementation and inside this method you can code here to appear the field in disable mode.
    Cheers,
    Swamy Kunche

  • Adding Custom screen for Create Space functionality in WebCenter Spaces

    I need some information on WebCenter Spaces.
    By default there are couple of parameters such as Space name, description, tag, url, status (Public, Private) etc. is required to create the Space with the Out-of-the-box screen in Spaces. But we have a requirement to create Group Space with some additional parameters too.
    I am finding a solution for that. Can we build a task flow with all the parameters that we need to create the Spaces ? If that is possible, can we use Spaces API to create the space and then deploy that task flow in Spaces ?
    Please let me know if there are any other options.

    Hi.
    Yes you can. Build a Task Flow consuming Spaces API (WebService or REST) and setting custom properties to it.
    Steps that you have to follow is:
    - Use API to create your group Space:
    //create the Space
    GroupSpaceWSMetadata gsMetadata =
    client.createGroupSpace("Databases", "Databases" "A community for people interested in databases", "databases, oracle", "CommunityofInterest");
    //print the Space GUID to provide confirmation of creation
    System.out.println("GUID: " + gsMetadata.getGuid());- You can add programmatically custom attributes:
    //create the custom attribute
    client.setCustomAttribute("Databases", "Vendors", "List of vendors", "java.lang.String", "Oracle, IBM");Code is from WebCenter Spaces API off doc: http://docs.oracle.com/cd/E25178_01/webcenter.1111/e10148/jpsdg_spaces.htm#CIHIJBIG
    Regards.

  • Adding Customized Feild For F-28

    Hi Gurus,
    My client having a requirement he want one Sales order Field in T code F-28 ,For this one i searched User Exit and BTE
    also but its not working Please give the some ideas how to add the Field
    Regards
    Mahesh

    Hi Mahesh,
    Just a suggestion, can't you use Document Header Text or Reference Document Number for storing the same ?, re-usability is the key.
    Hope that helps.
    Regards,
    Naveen

Maybe you are looking for

  • ***?? xp not connecting to wifi either!?

    im using an AirPort Extreme Basestation firmware 7.2.1 (Gigabit Ethernet) purchased August 2007 Issue is Iam using an imac & a PC computer to connect via WiFi. My imac has xp on a bootcamp partition. and the pc is running the same exactt version aswe

  • Help in buying PC or Mac?

    I am looking at two computers. One is the Mac Pro with these specs: 2.66ghz quad xeon 3gb RAM 640 gb HD at 7200 rpm Nvidia GT 120 with 512mb and the PC specs is this: 2.66ghz quad i7 6gb RAM 1.5tb HD at 7200 rpm ATI Radeon 5870 with 1GB Frostchill Wa

  • Crystal reports 8.5 runtime directories search order

    Hi, We are deploying an application based on run-time crystal reports 8.5 SP3. We connect to SqlServer via ODBC, using C++ API CRPE.H. The runtime includes CRPE32. DLL + P2SODBC.DLL + Microsoft MDAC last version Everything works fine, but we isolated

  • New SAP NetWeaver 7.0 ABAP Trial Version SP12

    Hello SDN Community, The new SAP NetWeaver 7.0 ABAP Trial Version SP12 is available for download at: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/b2918eea-0601-0010-6284-e6cb7eee4399 [original link is broken] [original link

  • Deleted default camera, how do i get it back ?

    ^^