CA Service Management

  • 1.  Unable to Fetch Category Value in Javascript Function

    Posted Mar 24, 2017 02:16 AM

    Hi Team,

     

    I am trying to access category attribute value in the javascript function on an event using the following code in detail_in page:

     

    var var_category=document.main_form.elements["SET.category"].value;

     

    But it is not returning any value.

     

    I have also added the following tag of category (not present out of box) under <form name="frm002"> tag:

     

    <input type="hidden" name="SET.category" value="$args.category">

     

    Still it is not returning any value (checked through alert).

    How I can fetch the value of category in javascript function?

     

    Although it is successfully fetching the value of customer using the code:

    var var_customer=document.main_form.elements["SET.customer"].value;

     

    Kindly suggest.

     

    Regards,

    Balram Singh Deswal



  • 2.  Re: Unable to Fetch Category Value in Javascript Function
    Best Answer

    Posted Mar 24, 2017 03:20 AM

    Hi, did you tried to use KEY.category?



  • 3.  Re: Unable to Fetch Category Value in Javascript Function

    Posted Mar 24, 2017 08:03 AM

    Hi Gutis,

     

    Yes I am able to fetch it now using KEY.category.

     

    Thanks for the solution.

     

    Regards,

    Balram



  • 4.  Re: Unable to Fetch Category Value in Javascript Function

    Posted Mar 24, 2017 03:33 AM

    Hi Balram,

     

    Can you try the following code? Maybe use jquery code be help

     

    var var_category = jq('input[pdmqa="category"]').val();

     

     

    Regards,

    Türker



  • 5.  Re: Unable to Fetch Category Value in Javascript Function

    Posted Mar 24, 2017 08:09 AM

    Hi Türker,

     

    This is also working.

    Thanks for the solution.

     

    Regards,

    Balram Singh Deswal