Unable to read values populated using Java Script

hi Experts,
we generated a BSP Page through some SPRO setting it contains HTML and ABAP scripts.
in that we have 2 select - option - dropdowns. i first one is being populated by ABAP script. second one is being populated by java script.
the BSP page is working fine. but i am unable to read the second dropdown value using a class method
we call this class method in the BADI : CRM_SERVICE_WEBREQ. method : FORM_ON_EVENT
  CALL METHOD cl_uxs_xml_services=>get_value_via_xpath
  EXPORTING
    ir_node                   = ir_form_data
    id_xpath                  = 'secondChoice'
     id_xpath_namespace_uri    =
     id_xpath_namespace_prefix =
     id_multi_namespace        =
  RECEIVING
    rd_value                  = lv_value
  EXCEPTIONS
    not_found                 = 1
    not_unique                = 2
    OTHERS                    = 3
but i am able to read other fields in the page. i am not sure but i changed the id and name on the second drop down.
pls let me know how to read the value for second drop down.

Hi Ben Grice,
ASP.NET questions should be post in
ASP.NET forums. You can get better help there.
Thanks for your understanding.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Read Text file using Java Script

    Hi,
    I am trying to read a text file using Java Script within the webroot of MII as .HTML file. I have provided the path as below but where I am not able to open the file. Any clue to provide the relative path or any changes required on the below path ?
    var FileOpener = new ActiveXObject("Scripting.FileSystemObject");
    var FilePointer = FileOpener.OpenTextFile("E:\\usr\\sap\\MID\\J00\\j2ee\\cluster\\apps\\sap.com\\xapps~xmii~ear\\servlet_jsp\\XMII\\root\\CM\\OCTAL\\TestTV\\Test.txt", 1, true);
    FileContents = FilePointer.ReadAll(); // we can use FilePointer.ReadAll() to read all the lines
    The Error Log shows as :
    Path not found
    Regards,
    Mohamed

    Hi Mohamed,
    I tried above code after importing JQuery Library through script Tag. It worked for me . Pls check.
    Note : You can place Jquery1.xx.xx.js file in the same folder where you saved this IRPT/HTML file.
    <HTML>
    <HEAD>
        <TITLE>Your Title Here</TITLE>
        <SCRIPT type="text/javascript" src="jquery-1.9.1.js"></SCRIPT>
        <script language="javascript">
    function Read()
    $.get( "http://ldcimfb.wdf.sap.corp:50100/XMII/CM/Regression_15.0/CrossTab.txt", function( data ) {
      $(".result").html(data);
      alert(data);
    // The file content is available in this variable "data"
    </script>
    </HEAD>
    <BODY onLoad="Read()">
    </BODY>
    </HTML>

  • Need to compare html text area values by using java script

    I have one html text area in my JSP file. when i click on that text area, a pop-up will come, in that pop-up i have list of items. So after selecting a item from that pop-up list, need to click okay. so that text area will update with the selected value.
    In this case, i need to compare the first text area value and updated text area value. How can i do that in Java Script.

    I suggest you look for a Javascript forum to ask questions about Javascript. This is a Java forum.

  • Error in Dynamic Value Change Using Java script

    Hi ,
    I am trying to put dynamic value sin tabular form report.
    I used the below code
    function updateLOV3(filter, listName,itemId,po_no){
    var xml = null;
    var list = document.getElementById(listName);
      var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=Update_Invoice_UOM',0);
    alert(po_no);
    alert(itemId);
    get.add('TEMPORARY_ITEM', po_no);
    get.add('TEMP_ITEM', itemId);
    alert(list);
    ret = get.get('XML');
    if(ret){
      var s = ret.getElementsByTagName("select");
      if(s){
       var o = ret.getElementsByTagName("option");
       oCount = o.length;
       if(oCount!='0'){
            var l_Opt_Xml = o[0];
            appendToSelect(list, l_Opt_Xml.firstChild.nodeValue);
    if(oCount=='0'){
    alert('entering');
       list.value=0;
    get = null;
    function appendToSelect(pSelect,pContent) {
    alert(pContent);
    pSelect.value=pContent;
    }my Application Process code is
    declare
    begin
    owa_util.mime_header('text/xml', FALSE );
    htp.p('Cache-Control: no-cache');
    htp.p('Pragma: no-cache');
    owa_util.http_header_close;
    htp.prn('<data>');
    htp.prn('<select>');
    for rec in (SELECT UNIT_OF_MEASURE r ,UNIT_OF_MEASURE d FROM HOMES_RGP_PURCHASE_ORDER_LINES WHERE ITEM_ID = :TEMP_ITEM AND
    PURCHASE_ORDER_ID = :TEMPORARY_ITEM)
    loop
    htp.prn('<option value="' || rec.d || '">' || rec.r || '</option>');
    end loop;
    htp.prn('</select>');
    htp.prn('</data>');
    end;In my application process if i removed the PURCHASE_ORDER_ID = :TEMPORARY_ITEM then the value is coming.
    Java Script giving both values like item id and purchase order id.
    If i ran the sql query manually its giving values.
    i hope thers is some error in get.add method in java script.
    Its always going into the below condition
    if(oCount=='0'){
    alert('entering');
       list.value=0;
    get = null;but manually i have checked the database the value is present.
    Please anyone help me out in this.
    Regards,
    Shan...

    Hi all,
    The same i have checked with emp table but still i got the same problem.
    Its my application process
    declare
    begin
    owa_util.mime_header('text/xml', FALSE );
    htp.p('Cache-Control: no-cache');
    htp.p('Pragma: no-cache');
    owa_util.http_header_close;
    htp.prn('<data>');
    htp.prn('<select>');
    for rec in (SELECT ename r,ename d FROM 
    emp
    WHERE  empno = :TEMP_ITEM)
    loop
    htp.prn('<option value="' || rec.d || '">' || rec.r || '</option>');
    end loop;
    htp.prn('</select>');
    htp.prn('</data>');
    end;My Javascript code is
    <script type="text/javascript">
    function setvalues(itemId,list)
    var s = $v(itemId);
    alert(s);
    var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=POPULATE_EMPNAME',0);
    get.add('TEMP_ITEM', s);
    ret = get.get('XML');
    if(ret){
      var s = ret.getElementsByTagName("select");
      if(s){
       var o = ret.getElementsByTagName("option");
       oCount = o.length;
       if(oCount!='0'){
            var l_Opt_Xml = o[0];
            appendToSelect(list, l_Opt_Xml.firstChild.nodeValue);
    if(oCount=='0'){
       list.value=0;
    get = null;
    function appendToSelect(pSelect,pContent) {
    pSelect.value=pContent;
    </script>Can anyone suggest me what i have missed???
    Cheers,
    Shan

  • Read, Modify and Apply Report XML using Java Script

    Hi Guys,
    Is there any way that we can Pragmatically Read, Modify and Apply Report XML using Java Script or some other way.
    Thanks
    Kaushik
    Edited by: Kaushik K on Jun 20, 2012 8:36 PM

    Requirement ::
    Users should be able to add Column to the Report Dynamically at Runtime.
    (There are around 1000+ Users, Answers Approach is not acceptable)
    So we are planning to provide a Multi Select / Shuttle Box Option for Users to add Columns dynamically. (Only for Table View)
    What we planned to DO ::
    Create a Presentation Variable Prompt, Which reads the Metadata Table (Presentation Table.Column Name, populated using the Metadata Dictionary)
    And Create a report with One Column and the Column Fx like @{var_dynamic_columns}{'"Time"."Year","Time"."Month"'}
    With this, OBIEE is rewriting the Logical SQL Currently as "Select "Time"."Year","Time"."Month" from "A - Sample Sales" "
    But getting an error
    The number of columns returned in retrieving column metadata was invalid (expected: 1; received: 2)
    So we want to see, if we can rewrite the Advanced XML of the Report to have dynamic columns based on the Values from the Presentation Variable.
    Please help me if this is a viable solution or any other better solution.

  • How to pass values to variables in WAD 7.0 using java script

    Hi.,
    My requirement is based on WAD 7.0.
    The sales value has to displayed in WAD using graph with various chart types.
    I have created variables for plant and material group in a query.
    I have created drop down box for plant with all plants in it, check box for material group and a Submit button in WAD in FORM tag of HTML coding.
    Once all the values are set in drop down box, checkbox and if the user clicks on submit button, the values has to captured by the variables for which I have created and the graph has to be aligned to the new values in variables.
    Kindly help me how to use java script to get the values from FORM and pass it to variables.
    Regards,
    Selva

    Hi Selva,
    You do not need to use Javascript for this. Instead you can achieve this by using API Commands in WAD 7.0.
    Please configure Action on the ButtonGroup webitem to use 'Commands'.
    ->Choose Command 'Set Variables Values / SET_VARIABLES_STATE' under Commands for Web Templates
    ->Set Display Variable Screen setting to OFF
    ->Choose Query Variable for Plant, Select Variable Type as 'Binding Type', Binding Type as 'Data Provider Selection', Data Provider as the one you have assigned to the Dropdown webitem, Characteristic as 0PLANT or as that assigned to the Dropdown webitem
    ->Repeat above steps for Query Variable Material Group
    Now when you make a selection from the Dropdown webitems, the Chart output will change accordingly. Let me know if this helps.
    --Priya

  • I have to new version of FireFox and it doesn't allow me to use my Go daddy Email account. Go daddy said this is a beta version, so its not reading Go daddy's java script

    This new version of FireFox is in beta. I cannot send email with my Go Daddy web based email service. Go daddy tech support says this FireFox in beta is not reading Go Daddy's java script. That why I cannot send email with FireFox. Can I install the older version back. If so how?

    Hmmm, Norton extensions are broken again in Firefox 4.0.1. It seems that Norton didn't allow for Firefox 4.0 security updates when they updated their Firefox extension for Firefox 4.0. Norton says they'll have a fix in two weeks. A Norton user posted a fix in this forum thread.
    http://community.norton.com/t5/Norton-Internet-Security-Norton/Norton-Toolbar-not-compatible-with-FF-4-0-1/td-p/442788

  • How to  build a  Calculator in WAB Template  by using  Java Script......

    Hi ,
    I am  trying   to build a dynamic  calculator in WAD which is as  similar to one in Executive view in Cognos. The  problem i am  facing  is,  i can  able to build a normal  calculator  by using  java script  but  i am  unable  to read the  key figure  values from  the  analysis  item  on from the  data  provider  in to  by  calculator  by using  on click  function. I wanted  to get the all  the  values in to a internal excel , so  that  my calculator can read the  values from  that. can  any  one  help  me  on getting  values in to internal excel by using   java before the  executing the  web template ?...
    Thanks in advance....
    Jhon.
    Edited by: sap bw on Jul 31, 2008 5:51 PM
    Edited by: sap bw on Jul 31, 2008 5:52 PM

    I might not be understanding your question completely since you mention WAD and then Excel, but if you are asking how to get the key figure values using Javascript in WAD, you can go to the Dataprovider properties and enable 'Output Result Data'.  This will embed an XML element into the HTML output that you can then parse using standard Javascript DOM navigation.
    Hope this helps.

  • How to get the context data using java script in interactive forms

    Hi All,
    How to get the context data using java script in interactive forms by adobe,  am using web dynpro java
    thanks.

    Hi venkat,
    Please Refer this link.
      Populating one Drop-Down list from the selection of another Drop-down list
    Thanks,
    Raju.

  • Display pop ups in the jsp by using Java script

    Hi
    can any body say ,how to display pop ups in the jsp by using Java script ?

    that's correct. You can use the below code for AJAX request.
    <script type="text/javascript">
    var httpObject = getHTTPObject();
    //create XMLHttpRequest object
    function getHTTPObject() {     
         var xmlhttp;
         if (window.XMLHttpRequest) // if Mozilla, Safari etc
              xmlhttp = new XMLHttpRequest();
         else if (window.ActiveXObject){ // if IE
              try {
                   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
              catch ( e ){
                   try{
                        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                   catch ( e ){}
         return xmlhttp;
    //define the function to send the request
    function sendRequest(){
        var currDesc = document.getElementById("description").value;
        var URL =  "manageMaintAction.do"; //action mapping in your struts-config
        var queryString = "currDesc="+escape(currDesc); //get the currDesc value in your action class like request.getParameter("currDesc")
        httpObject.open( "Post", URL, true );
        httpObject.onreadystatechange = cbFn;
        httpObject.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded");
        httpObject.send(queryString);
    //callback fn
    function cbFn() {
        if (httpObject.readyState == 4)
             if (httpObject.status == 200)
              var result = httpObject.responseText;
              alert(result);
    </script>

  • Acrobat standard 9.0 error while enabling commets option using Java script object

    I'm using the below java script code in my VB 6.0 application for enabling commets options in the PDF file
    Dim oJSO As Object
    Set oJSO = mPDDoc.GetJSObject
    oJSO.Collab.showAnnotToolsWhenNoCollab = True
    It is working fine till Acrobat 8.0. Now I'm trying with Acrobat 9.0 standard edition, it is throwing scripting error 'An unhandled Win32 exception occured in Acrobat.exe[308].
    Can anyone suggest the way to enable 'comment' options in Acrobat Standard 9.0 using Java Script Object?
    Thanks

    I get much the same problem with VB6, Acrobat 9 Pro and WinXP SP3. When I single step the line:
    oJSO.Collab.showAnnotToolsWhenNoCollab = True
    in debug I go to the error handler for my Sub. Inspecting the VB Err object has Number = -2147417851 and Description = "Automation error
    The server threw an exception." I get a Microsoft crash notice about Acrobat a short while later.
    I've experimented with the JavaScript debugger in Acrobat and you can execute Collab.showAnnotToolsWhenNoCollab = True and reference the value of Collab.showAnnotToolsWhenNoCollab in the console. The problem appears only when accessing Acrobat Javascript through the Interapplication Communication API.
    If anyone can help it would be appreciated. I tried Adobe's Acrobat support and they were no help at all.

  • Adobe Form : detect page break using java script

    Hi,
    How can we detect a page break at a runtime using java script? I need to display a data in internal table at header and unique for a document number. i've 10 order list which has multiple items, each of the orders are printed in a new page and i wanted to know this event using a java script which could help me to add some additional logic at header.....pls can someone help on this?

    Hello Prabhu,
         From your doubt, what I understand is that, You have designed a header in Master Page. You need to fill this header using the Item table which is already designed in the design view(body page). Means you want to fill the Item details(which are in body page) into the header(which is in the master page).
    To read the contents from body page into master page, you need to write Javascript code on the header fields(which is in the master page) in the Layout Ready Event.
    For example, if you want to fill the field Order_description in header(master page) from the column Order_Description which is in the Item table(body page)
    In the form layout, select the order_description field and in the event READY LAYOUT write the below JavaScript code.
    var currpage = xfa.layout.page(this);------> Get the current page
    var fields = 0;------> Variable to store the number of fields in that page.
    fields = xfa.layout.pageContent(currpage-1, "field", 0); ------> Get the number of fields
    for ( i=0; i<= fields.length-1; i++ ) ------> Loop on each field on the page
        if ( fields.name == "ORDER_DESCRIPTION" ) ------> Check if the corresponding field is in the Item table
             this.rawValue = fields.item(i).rawValue; ------> Assign that value in the Header field
    Repeat the same steps for other fields in the Header. This will work for all Purchase Orders spanned across multiple pages.

  • Can we use Java Script in SAP BusinessObjects Web Intelligence 4.1?

    Can we use Java Script or any other Script in BI 4.1 Web Intelligence? If possible please do let me know the method/process

    Hi Kranthi,
    You have option to read a cell content as html. else you will have to go for SDK. I think you will get better suggestions, if you can explain your requirement in a little detailed manner.
    refer below links for more details about SDK.
    http://bukhantsov.org/2013/04/how-to-create-a-webi-document-using-java-report-engine-sdk/
    Regards,
    Nikhil Joy

  • How to fetch Properties of all Survey Lists from site collection using Java Script in SharePoint 2013

    Hi,
    I am trying to fetch properties of all lists of "Survey Type" from my site collection in SharePoint 2013 using script editor web part. I am able to fetch properties of one list by mentioning its name explicitly in code but not all survey
    list.
    My task is to display Survey name , description ,Time created and URLs of all survey lists using java script in script editor web part.
    And let me know , if there is any other OOB feature of SharePoint 2013 to achieve the same. 
    Here is the code  :
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    SP.SOD.executeFunc('sp.js', 'SP.ClientContext', sharePointReady);
    function sharePointReady() {
         GetSurveyList();
     function GetSurveyList() {
            var spListTitle = " List Name";
             var clientContext = new SP.ClientContext.get_current();
            var oWeb = clientContext.get_web();
            this.surveyList = oWeb.get_lists().getByTitle(spListTitle);
            clientContext.load(surveyList);
            clientContext.executeQueryAsync(Function.createDelegate(this, this.GetListProperties),Function.createDelegate(this, this.onFailure));
     function GetListProperties() {
            $("#SurveyList").text("");
            var surveyTable = "<table border=1>";
            surveyTable = surveyTable.concat("<tr><td>Survey Name</td>");
            surveyTable = surveyTable.concat("<td>Survey Description</td>");
            surveyTable = surveyTable.concat("<td>Time Created</td>");
            surveyTable = surveyTable.concat("<tr><td>" + surveyList.get_title() + "</td>");
            surveyTable = surveyTable.concat("<td>" + surveyList.get_description() + "</td>");
            surveyTable = surveyTable.concat("<td>" + surveyList.get_created().format("MM/dd/yyyy hh:mm tt")+ "</td>");
                 surveyTable = surveyTable.concat("</table>");
            $("#SurveyList").append(surveyTable);
        function onFailure(sender, args) {
            alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    </script>
    <div id="SurveyList"></div>

    Shifa,
    Please use search result webpart or content query webpart to list all survey list.
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • How to pass parameters to a page invoked using java script.--- Very Urgent.

    Hello,
    I have an advanced Table in my page. In the first column there is a
    messageChoice. In the second column there is link item.On the link item i have set the following value for destination uri.
    javascript:var a=window.open('OA.jsp?page=/AutoSales/oracle/apps/per/auto/webui/AutoSurrogatesPG&retainAM=Y','a','height=500,width=900,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbar=yes'); a.focus();
    The user selects a value from the message choice and when he clicks on the link item, the value selected from the list should go to the new page invoked using java script as a parameter. I need the value selected from choice to generates few fields in the new page. I have preferred java script because i need the base page and a model window should open. I have tried using setForwardUrl() and setting '_blank' and new window for target frame property on the link item. But it isnt working. The new page is opening in the same window.
    I have also tried putting the value in a session.
    Please help with any kind of suggestions or solutions.
    Thank you.

    Uma,
    You need to
    - Have a PPR Action on the messageChoice (this would trigger a form submit to populate the underlying View Attribute)
    - Either
    - Retrive the value from the View Attribute in the pop-up page (as I could see that you are retaining the AM)
    - Use a SPEL in the link (on the modal page) to use the value from the View Attribute as the parameter value (in the form ${oa.current.<ViewAttributeName>)
    HTH

Maybe you are looking for