Using Ajax in Iscript

Hi all

I am using Ajax in Iscript and have problem, when I give my page url target (which is another page of Iscript). However when I give this url in my browser it works fine. Here is my sample code

IScript Main Page that sends the Ajax request *.

function ajaxrequest()

{

var XMLHTTP;

If (window. XMLHttpRequest) {/ / code for IE7 +, Firefox, Chrome, Opera, Safari}

XMLHTTP = new XMLHttpRequest();

}

on the other

{/ / code for IE6, IE5}

XMLHTTP = new ActiveXObject ("Microsoft.XMLHTTP");

}

XMLHTTP.onreadystatechange = function () {}

If (xmlhttp.readyState == 4 & & xmlhttp.status == 200)

{

document.getElementById("myDiv").innerHTML = xmlhttp.responseText;

}

var abcParamEnc = encodeURIComponent (document.getElementById("abc").value);

parameters var is 'abc =' + abcParamEnc;.

Local everything & url = GenerateScriptContentURL (% Portal, % node, Record.weblib_targetpage, Field.ISCRIPT1, "FieldFormula", "IScript_HelloWorld");

XMLHTTP. Open ('POST', ' & url', true);

xmlhttp.setRequestHeader ("Content-type', ' application/x-www-formulaires-urlencoded");

XMLHTTP. Send (Parameters);

}

***********************Target Page *******************

String & courseEncoded = % Request.GetParameter ("coursecode");

Local number & courseEncodedLenth = Len (& courseEncoded);

If courseEncodedLenth > 2 then

Response.Write ("false");

on the other

Response.Write ("true");

Please tell me what I'm doing wrong. Why can't I call ajax in my iscript...

Thanks in advance

msf321

First of all, you could reduce your JavaScript to a couple of lines using jQuery instead. Yes, if you use jQuery would increase your total number of JavaScript, but must not maintain jQuery. You would just maintain the lines of 3 or more using jQuery. Also, just FYI, jQuery is included with 8.53 PeopleTools, so it is quite easy to include in an iScript.

Now, on to the Ajax... I'm glad that you highlighted the line 'Local any... ". "in bold because that's the problem. From the list above, it seems that you have in your JavaScript. Instead, you must place all the JavaScript from the upper list (and corresponding HTML) code in a HTML definition and edit your Local everything & url line to this:

var url = "%Bind(:1)";

xmlhttp.open('POST', url, true);

In your PeopleCode iScript, which actually serves this definition HTML, use the following syntax:

Local string &url = GenerateScriptContentURL(%Portal, %Node, Record.weblib_targetpage, Field.ISCRIPT1, "FieldFormula", "IScript_HelloWorld");

Local string &html = GetHTMLText(HTML.NAME_OF_HTML_DEFN, EscapeJavaScriptString(&url));

%Response.Write(&html);

If you have Firefox, install Firebug and look at the console when loading the page. If you don't see any JavaScript errors, then your JavaScript syntax is good. Then, set a breakpoint at the var url =... line. Run the JavaScript (or reload the page, then it will run) and inspect the value of the url.

Tags: Oracle Applications

Similar Questions

  • How to send data in eloqua with using ajax?

    Hello

    someone tell me how to send data using ajax?

    Thank you

    Rahul

    Hi Rahul

    Using this code to send data to AJAX

    $.ajax({)

    URL: ' your action? elqformname = name of the form eloqua & elqSiteID = eloqua site ID',

    type: 'POST',

    data: "field name =" + document.getElementById('field_id').value + "="+ document.getElementById('field_id').value field name,

    success: {function (html)}

    }

    })

    Thank you

    edynamic expert Eloqua

  • Validation of a tabular presentation online using Ajax

    I am trying to create a java script confirm the dialog box in the form of...

    When the user attempts to insert a new line with even Ename and job that already exists in the table, and once they press the button for treat, I check via ajax if data exist or not. If it exists, immediately present the user with a Confirmation e-mail "you want to proceed by adding same Ename and job.

    Apex. Oracle.com

    W/U/P: nani5048/test/test

    App: 11967 page 2

    attempted to replicate, but his does not work. JavaScript - how to perform Validation of line by line on an APEX Oracle tabular form using Ajax - stack overflow

    Existing values:

    In the form of:

    Hello

    I edited the sample application in the given workspace.

    I've added a javascript that runs on "before the submit page.

    I also added a reminder AJAX "validating data".

    the confirmation box is there,

    I don't know how to proceed.

  • Offer of external form using AJAX

    I have an external form, and I want to introduce the external form data to a form of Eloqua using an asynchronous AJAX action. I tried to find answers to this on the web with no luck. I have successfully obtained the GUID. The form works fine when I use a regular send button, connect to Eloqua successfully. However, as soon as I attach a .ajax function to the Submit button (which tries to send data asynchronously and also cancels regular action button), this function does not succeed. My .ajax function looks like this:

    $("#submitButton").click (function () {}

    var dataString = 'elqSiteID =' + elqSiteID + '& elqFormName =' + elqFormName + '& FirstName =' + name + ' & LastName = "+ LastName + '& Email =' + Email + '& retURL =' + retURL + '& elqCustomerGUID =' + elqCustomerGUID + '& elqCookieWrite =' + elqCookieWrite;"

    $.ajax({)

    type: 'POST',

               url: " http://now.Eloqua.com/e/F2.aspx ",

    data: dataString,.

    success: function() {}

    $('#responseMessage').html ("< h2 > Contact form sent! < / h2 > ");"

    }

    });

    Returns false;

    });

    (In the actual JavaScript, datastring variable contains name = pairs of value I have indicated here. The ones of the device).

    I must add that when this function points to a lazy PHP page instead of http://now.eloqua.com/e/f2.aspx, the .ajax function succeeds, insert the "Contact submit form!  text in the external form page. But when I then try to say that the PHP page to submit the data to http://now.eloqua.com/e/f2.aspx, .ajax function is unsuccessful.

    So, I need to know how to send these data to Eloqua directly from my external form page using AJAX, or I need to know how to get this PHP page to submit these data to Eloqua in turn. But I'm hoping for a solution on the page of the external form, since I don't need to do anything to the data until it goes to Eloqua.

    Thank you!

    Thank you, James. I learned a little more about CURL (there are many out there), and now, I now have my AJAX function (to which is attached the button 'Send') pointing to a PHP file that uses a little CURL script. And it works!

    The file PHP says, in its entirety:

    $inputdata = array();

    {foreach ($_POST as $key-online $val)}

    [$inputdata] = $key. ' = '.urlencode ($val);

    }

    $query = implode ("&", $inputdata);

    $initialization = curl_init ("http://now.eloqua.com/e/f2.aspx");

    curl_setopt ($initialization, CURLOPT_HEADER, 0);

    curl_setopt ($initialization, CURLOPT_POST, 1);

    curl_setopt ($initialization, CURLOPT_POSTFIELDS, $query);

    curl_setopt ($initialization, CURLOPT_FOLLOWLOCATION, 0);

    curl_setopt ($initialization, CURLOPT_REFERER, "http://www.chrissellers.com");

    curl_setopt ($initialization, CURLOPT_RETURNTRANSFER, 1);

    $data = curl_exec ($initialization);

    curl_close ($Initialization);

    Because I don't want to take the user leaves the page of the form, I do not do anything with $data.

  • Process the password recover all on one page (using AJAX)?

    Hi people,

    I created a page with the login form in a secure area, and I also load the application form to recover password on/_System/SystemPages/PasswordRetrieveRequest page using AJAX.

    The request to recover password is displayed when a user presses the lost password link. It all works very well.

    What I would do , is also display the results of the form submission request to recover password on the same page. I understand that the endpoint is LostPasswordProcess.aspx but I'm not sure how exactly to go about it.

    I saw this post on Stackoverflow, but I am having trouble using the suggestion of Robert K Bell in my situation.

    Anyone know if what I am wanting to do is possible and they can give me a little push in the right direction?

    Thank you

    Luke

    OK Luke. Well you don't do not query ajax form.

    You have a page with module_Data reading of a where via a url parameter clause and the blur of the email field request you ajax page in JSON format from the e-mail as a parameter and you will get the CRM client object or not returned.

  • How to save a variable, using AJAX, a database mySQL using Coldfusion?

    I have a jquery script that takes a background color of an image using AJAX. I would like to save the variable, var rgba = e.rgba () on a MySQL database. The person who created the script says to use: $.post("color.php",{rgba:reba});) to save a database with AJAX. How to save the var rgba using coldfusion to do CF?

    The script:

    < script >

    ;(Function($){

    $. fn.canvasify = function (f) {/ / faster than dynamically converting one pixel at a time}

    return this.map (function () {}

    If {(this.nodeName=="IMG)"}

    var canvas = $("< canvas >')

    This.SRC = this.src / / IE fix

    $(this) .one ('load', function () {}

    Canvas.Attr ({width: this.width,:this.height}) height})

    Canvas [0]. GetContext ('2d'). DrawImage(This,0,0,this.) Width, this. Height)

    $(this) .replaceWith (canvas)

    })

    return the canvas [0]

    } else {}

    return this

    }

    })

    }

    function Rgba (rgba) {}

    This.RGBA = rgba

    this.toString = function() {return "rgba (" + Array.prototype.join.call (this.rgba, ',') + ")"}

    }

    $. {Event.prototype.RGBA = Function ()}

    var x = this.offsetX | (this.pageX - $(this.target) .offset () .left),.

    this.offsetY = y | (this.pageY - $(this.target) .offset () .top).

    nodeName = this.target.nodeName

    If (nodeName = "CANVAS")

    return new Rgba (this.target.getContext('2d').getImageData(x,y,1,1) .data)

    ElseIf (nodeName = 'IMG') {}

    var canvas = document.createElement ("canvas")

    Canvas.Width = 1

    Canvas.Height = 1

    canvas.getContext('2d').drawImage (this.target, x, y, 1, 1, 0, 0, 1, 1)

    return new Rgba (canvas.getContext('2d').getImageData (0,0,1,1) .data)

    } otherwise return null

    }

    (}) (jQuery)

    {$(function()}

    $("figure").append ("< class p =" rgba">" ")

    $('img').canvasify ravishing (demo))

    $('img').click (demo)

    function {persons

    var rgba = e.rgba (),

    digit = $(this) .parent)

    Figure.CSS ('background-color', RGBA). Find ("p"). Text (RGBA)

    }

    });

    < /script >

    < style >

    {p.RGBA}

    background: white;

    color: black;

    border: 1px solid red;

    min-height: 20px;

    }

    < / style >

    Here's some pseudocode

    AJAX

    ...

    $data = {RGBA: $rgba, var1 = $var1, var2 = $var2, etc.};

    ...

    var ajaxResponse = $.ajax({)

    type: 'POST',

    URL: '.. '. /.. /dir/settings.CFC? Method = saveBGColor,

    contentType: "application/json; charset = utf-8 ",

    data: JSON.stringify ($data).

    etc.

    });

    Settings.CFC

  • How to use Ajax get multiple values in an array?

    Hi All-

    I am using AJAX to get multiple values in a table using example of Denes Kubicek in the following link-

    http://apex.oracle.com/pls/otn/f?p=31517:239:9172467565606:NO:

    Basically, I want to use the drop-down list to fill the rest of the values in the form.

    I created the example (Ajax get several values, 54522 application) on the Oracle site.

    http://apex.oracle.com/pls/apex/f?p=4550:1:0:

    Workspace: iConnect

    Login: demo

    password: demo

    I was able to reproduce his example on page 1 (homepage).

    However, I want to use system generate a table to complete this example and was not able to complete the data correctly.

    Page 2 (method 2) is that I'm struggling to fill the column values. When I checked the item application values in the Session, and values seems to be filled properly.

    That's what I did on this page:

    1 create an Application process on-demand - Set_Multi_Items_Tabular2:

    DECLARE
      v_subject my_book_store.subject%TYPE;
      v_price my_book_store.price%TYPE;
      v_author my_book_store.author%TYPE;
      v_qty NUMBER;
    
      CURSOR cur_c
      IS
      SELECT subject, price, author, 1 qty
      FROM my_book_store
      WHERE book_id = :temporary_application_item2;
    BEGIN
      FOR c IN cur_c
      LOOP
      v_subject := c.subject;
      v_price := c.price;
      v_author := c.author;
      v_qty := c.qty;
      END LOOP;
    
      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 ('<body>');
      HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
      HTP.prn ('<item id="f04_' || :t_rownum || '">' || v_subject || '</item>');
      HTP.prn ('<item id="f05_' || :t_rownum || '">' || v_price || '</item>');
      HTP.prn ('<item id="f06_' || :t_rownum || '">' || v_author || '</item>');
      HTP.prn ('<item id="f07_' || :t_rownum || '">' || v_qty || '</item>');
      HTP.prn ('</body>');
    END;
    
    
    
    
    
    

    2. create two objects application - TEMPORARY_APPLICATION_ITEM2, T_ROWNUM2

    3. put the following text in the Page header:

    <script language="JavaScript" type="text/javascript">
    function f_set_multi_items_tabular2(pValue, pRow){
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Set_Multi_Items_Tabular2',0);
    if(pValue){
    get.add('TEMPORARY_APPLICATION_ITEM2',pValue)
    get.add('T_ROWNUM2',pRow)
    }else{
    get.add('TEMPORARY_APPLICATION_ITEM2','null')
    }
        gReturn = get.get('XML');
        if(gReturn){
            var l_Count = gReturn.getElementsByTagName("item").length;
            for(var i = 0;i<l_Count;i++){
                var l_Opt_Xml = gReturn.getElementsByTagName("item")[i];
                var l_ID = l_Opt_Xml.getAttribute('id');
                var l_El = html_GetElement(l_ID);    
                if(l_Opt_Xml.firstChild){
                    var l_Value = l_Opt_Xml.firstChild.nodeValue;
                }else{
                    var l_Value = '';
                }
                if(l_El){
                    if(l_El.tagName == 'INPUT'){
                        l_El.value = l_Value;
                    }else if(l_El.tagName == 'SPAN' && l_El.className == 'grabber'){
                        l_El.parentNode.innerHTML = l_Value;
                        l_El.parentNode.id = l_ID;
                    }else{
                        l_El.innerHTML = l_Value;
                    }
                }
            }
        }
        get = null;
    }
    </script>
    
    
    Add the follwing to the end of the above JavaScript:
    
    <script language="JavaScript" type="text/javascript">
    function setLOV(filter, list2)
    {
     var s = filter.id;
     var item = s.substring(3,8);
     var field2 = list2 + item;
     
     f_set_multi_items_tabular2(filter, field2);
    }
    
    
    
    
     
    
    
    

    4 query in the form:

    select
    "BOOK_ID",
    "BOOK",
    "SUBJECT",
    "PRICE",
    "AUTHOR",
    "QTY",
    "BOOK_ID" BOOK_ID_DISPLAY
    from "#OWNER#"."MY_BOOK_STORE"
    
    
    
    
    
    

    5. in the column of Book_ID_DISPLAY attribute:

    Add the following code to the attributes of the element: onchange = "javascript:f_set_multi_items_tabular2(this.value,'#ROWNUM#'); »

    Changed-> onchange = "javascript:setLOV(this,'f03'); »

    Now, T_ROWNUM2 returns the value as f03_0001. But TEMPORARY_APPLICATION_ITEM2 returns in the form [object HTMLSelectElement]...

    Please help me to see how I can fill the data in the tabular presentation format. Thank you in advance!

    Ling

    Updating code in red...

    Ling

    LC says:

    Application Item Value Item Name
    54522 3 TEMPORARY_APPLICATION_ITEM2
    54522 f03_0003 T_ROWNUM2

    No T_ROWNUM2 should be 0003.

    I made a copy of your page to make corrections.

    There are several problems.

    First you where submiting T_ROWNUM2 whereas you would use: t_rownum in the pl/sql code.

    I changed the name of the element in the f_set_multi_items_tabular2.

    Secondly you where now affecting the rownumber f03_0001 for the first line.

    Resulting XML returned as follows.

    this xml genericly sets multiple items
    CSS Mastery
    22
    Andy Budd
    1
    
    

    I changed the following text in the show_lov.

    var point = s.substring (4.8);

    var Field2 = item;

    I also had a compilation of pl/sql code error, there was a); missing the end of the last item. Fixed that too.

    But why do you think lpad won't work for lines 10 and more.

    LPAD ('10', 4, '0') will give "0010"

    LPAD ('100 ', 4,'0 ') will give "0100"

    LPAD ('1000 ', 4,'0 ') will give '1000'

    So unless you have more than 9999 lines you would have no problem.

    Nicolette

  • External data loading using ajax

    Hello

    I try to load external data using $.ajax...

    After a few failures, I wrote a simple HTML file containing this script:

    //----------------------------------------------------------------------------

    < script type = "text/javascript" >

    $(document) .ready (function () {}

    $("button").click (function () {}

    $.ajax ({url: "."}) "/ quiz.json", async:false, success:function (result) {}

    Alert (result);

    }});

    });

    });

    < /script >

    //----------------------------------------------------------------------------

    This works as expected. So I tried to include this code in the edge like this:

    //----------------------------------------------------------------------------

    Symbol.bindElementAction (compId, NomSymbole, 'document', 'compositionReady', function (sym, e) { })

    Model responsible

    .. .some other code...

    function loadAJAX() {}

    $.ajax ({url: "."}) "/ quiz.json", async:false, success:function (result) {}

    Alert ((result));

    }});

    }

    .. .the more code...

    //----------------------------------------------------------------------------


    When I call the function 'loadAJAX() '; I get "Javascript error in the event handler. Type of event = element '...


    I tried several other things - but nothing has worked. Any help would be greatly appreciated.


    What version of edge host do you use?

    20141 and 2014.1.1 is no longer the jQuery included in its execution, and if you use one of these version, you need to add the jQuery explicitly.

  • Send page element using AJAX

    Hi all

    Thanks for any help in advance.

    I am currently submitting an item in the session using AJAX iin version 4.1

    I have an application process that matches a request on: run this application process when requested by a process page.
    begin
      :P4_FISCAL_YEAR2 := :AJAX_4_FISCAL_YEAR2;
    end;
    Then, in the order of the day: P4_FISCAL_YEAR2 have the form html attributes defined for element:
    (also the page element is set to None (Default) on the action of the page when the value is modified.
    onchange="selectChanged6(this)"
    and a process of page
    <script type="text/javascript">
    function selectChanged6(filter)
    {
    var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=SET_4_FISCAL_YEAR2',0);
    get.add('AJAX_4_FISCAL_YEAR2', filter.value);
    var ret = get.get();
    }
    </script>
    The question does not appear in the session and I can't understand why, thanks
  • Research of Web App using Ajax?

    I created a webapp that save the user information from photos, now I want to create a page where the user can filter the list displayed using ajax. I have an obligation not to use any submit button to filter the data, but as soon as the user selects the data as a checkbox is checked, the displayed data should gets filtered upwards according to the criteria, but from ajax. How can I achieve on this issue?

    Here is the image of the filter box:

    search.png

    Hello

    The way to do it would be to use jQuery function http://api.jquery.com/jQuery.post/ post and submit the web search form app using this function, then capture the results and display them on the page.

    See http://kb.worldsecuresystems.com/733/bc_733.html#main_Web_App_Search

    JavaScript is outside the scope of support, so I unfortunately can't offer more help on this, but I hope that gives you an idea of what you need to do.

    Kind regards

    -Sidney

  • Using AJAX with ColdFusion...

    Is it true that AJAX is not really looking for data in real time from the database when they say they do? For example, I have 2 lists of products using AJAX (see code below). The model has, if I click on the link "View Top 5 products" and then click on the 'Top 10 products display' link and then let the browser here, then I go to my database and modify the content of the second name in the top 5 products, then click on the link 'View Top 5 products' once again I do not see the content changed in the second Product Name. AJAX is supposed to only show different sets of data preloaded?

    Model has:
    < html >
    < head >
    < title > Untitled < /title >
    < script language = "javascript" type = "text/javascript" >
    function createRequestObject() {}
    var obj;
    var browser = navigator.appName;
    If (browser == "Microsoft Internet Explorer") {}
    obj = new ActiveXObject ("Microsoft.XMLHTTP");
    } else {}
    obj = new XMLHttpRequest();
    }
    Return obj;
    }

    var http = createRequestObject();

    function outputResult (c) {}
    http. Open ("get", "TemplateB.cfm? Count =' + c, true);
    http.onreadystatechange = handleResponse;
    http. Send (null);
    }

    function handleResponse() {}
    If (http.readyState == 4) {}
    document.getElementById('result').innerHTML = http.responseText;
    }
    }
    < /script >
    < / head >

    < body >
    < a href = "javascript:outputResult (5)" > view Top 5 products < /a > < br >
    < a href = "javascript:outputResult (10)" > view Top 10 products < /a > < br >
    < br > < br >
    < div id = 'result' > < / div >

    < / body >
    < / html >

    Model B (TemplateB.cfm):
    < cfquery name = "GetProducts" datasource = 'MyDataSource' >
    SELECT HIGH #Count # Product_ID, Product_Name, Product_Desc
    PRODUCTS
    ORDER BY DESC Product_ID
    < / cfquery >

    < html >
    < head >
    < title > Untitled < /title >
    < / head >

    < body >
    < table border = "1" cellpadding = "1" cellspacing = "1" >
    < b >
    < Td > product ID < table >
    < Td > < table > product name
    < Td > < table > product description
    < /tr >
    < cfoutput query = "GetProducts" >
    < b >
    < td > #Product_ID # < table >
    < td > #Product_Name # < table >
    < td > #Product_Desc # < table >
    < /tr >
    < / cfoutput >
    < /table >

    < / body >
    < / html >


    Quote:
    Is it true that AJAX is not really looking for data in real time from the database when they say they do?

    I don't know who 'they' are, but no, that's not true. Your request is probably get cached when you test it first. Try to add a random variable to your query string in your asynchronous get request. A var using date-time is the best way to do it.

  • Using AJAX to populate the display field only

    Hello

    I use APEX 3.2.1.
    I try to use AJAX to get the value of a table and display it as something "view only". Everything works fine when I use a text field but it does not work when I change the element to "display only".

    No idea what could be the problem?

    My request is here:
    http://Apex.Oracle.com/pls/Apex/f?p=25943:2

    User name: admin
    Password: admin

    Thank you
    Matthias

    Hello

    My example can help you
    http://Apex.Oracle.com/pls/Apex/f?p=40323:30

    BR, Jari

  • Using AJAX code for the conditional selection list.

    Hello

    I use AJAX code for the first time, I have no knowledge in java, I got the code from this forum and try to manipulate my requirement.

    My requirement is that I have two selection lists, host_name) 1 and 2) database_name.
    As soon as I pick/choose the value of host_name select list, I need to fill in only the databases on this particular host. I don't want to send the page for this action.

    Here is the code, thank you if anyone can help.


    On request the code application process:
    -----------------------------------------------------
    declare
    number of l_counter;
    l_o_name varchar2 (2000);
    Start
    owa_util.mime_header ("text/xml", FALSE ");
    HTP.p ('Cache-Control: non-cache');
    HTP.p ('Pragma: non-cache');
    owa_util.http_header_close;
    HTP. PRN ("< select > '");
    for rec in (select "ORA_DATABASES_VW". "' Database_name ' as 'database_name ',.
    'ORA_DATABASES_VW '. "" DB_ID "as"DB_ID ".
    of 'ORA_DATABASES_VW '.
    where 'ORA_DATABASES_VW '. ("' HOST_NAME ' =: TEMP_ITEM)
    loop
    HTP. PRN ("< option value ="' | rec.db_id |) '">' || Rec.database_name | ("< / option >");
    end loop;
    HTP. PRN ("</select > '");
    end;

    Header HTML on this page:
    =================
    < script language = "JavaScript1.1" type = "text/javascript" >

    function get_List_XML (source_item, target_item) {}

    var v_Target = html_GetElement (target_item);
    var v_Source = html_GetElement (source_item);
    var ajaxResult = new htmldb_Get (null, & APP_ID, 'APPLICATION_PROCESS = POPULATE_LIST_XML', 0);
    ajaxResult.add ('TEMP_ITEM', source_item.value);
    var v_result_xml = ajaxResult.get ('XML');

    If (v_result_xml & & v_Target)
    {
    var options_Contents = v_result_xml.getElementsByTagName ("option");
    v_Count = options_Contents.length;
    v_Target.length = 0;

    for (var i = 0; i < v_Count; i ++)
    {
    var v_opt_xml = v_result_xml.getElementsByTagName ("option");
    appendToSelect (v_Target, v_opt_xml.getAttribute ('value'), v_opt_xml.firstChild.nodeValue)
    }
    }

    }
    function appendToSelect (target_item, option_val, option_content) {}
    var v_Opt = document.createElement ("option");
    v_Opt.option_value = option_val;
    {if (document. All)}
    target_item.options.Add (v_Opt);
    v_Opt.innerText = option_content;
    } else {}
    v_Opt.appendChild (document.createTextNode (option_content));
    target_item. AppendChild (v_Opt);
    }
    }
    < /script >


    Attribute of the form in the host_name column element. P935_INSTANCE_DB_NAME is my page for database_name.
    OnChange = "get_List_XML (this,"P935_INSTANCE_DB_NAME").

    Feel free to mark the answers useful or correct ;)

  • Values with the HTML not getting informed when using AJAX in the APEX

    Hello

    I use AJAX to fill some values in a tabular report.

    I have a java script of this form (I took this example Denes http://apex.oracle.com/pls/otn/f?p=31517:241:1400877312570049) example

    < script language = "JavaScript" type = "text/javascript" >

    function f_set_multi_items_tabular (pValue, bow) {}
    get var = new htmldb_Get (null, html_GetElement('pFlowId').value,
    = Set_Multi_Items_Tabular', 0);
    {if (pValue)}
    Get.Add ('TEMPORARY_APPLICATION_ITEM', pValue)
    Get.Add ('T_ROWNUM', Prow)
    } else {}
    Get.Add ('TEMPORARY_APPLICATION_ITEM', 'null')
    }

    gReturn = get.get ('XML');

    {if (gReturn)}
    var l_Count = gReturn.getElementsByTagName("item").length;
    for (var i = 0; i < l_Count; i ++) {}
    var l_Opt_Xml = gReturn.getElementsByTagName ("item");
    var l_ID = l_Opt_Xml.getAttribute ('id');
    var l_El = html_GetElement (l_ID);
    {if (l_Opt_Xml.firstChild)}
    var l_Value = l_Opt_Xml.firstChild.nodeValue;
    } else {}
    var l_Value = ";
    }

    {if (l_El)}
    If (l_El.tagName == 'INPUT') {}
    l_El.value = l_Value;
    } Else if (l_El.tagName == 'SPAN' & & l_El.className == 'Raptor') {}
    l_El.parentNode.innerHTML = l_Value;
    l_El.parentNode.ID = l_ID;
    } else {}
    l_El.innerHTML = l_Value;
    }
    }
    }
    }
    get = null;
    }

    < /script >


    And I the process of application as follows
    BEGIN
    OWA_UTIL.mime_header ("text/xml", FALSE);
    HTP.p ('Cache-Control: non-cache');
    HTP.p ('Pragma: non-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ("< body >");
    HTP.prn ("< desc > This XML genericly defines several elements < / desc > '");
    HTP.prn ("< item id =" f05_000 "|: T_ROWNUM |" "> ' |: TEMPORARY_APPLICATION_ITEM |") ("< / item > ');
    HTP.prn ("< / body >");
    END;
    If I have: TEMPORARY_APPLICATION_ITEM as "Vikas" gets it displays correctly, but if I "& lt;" b & gt; Vikas & lt; b & gt;' it shows null. If she tags HTML function l_Opt_Xml.firstChild.nodeValue does not correctly work.
    Please tell me what modiifcation can I use in the l_Opt_Xml.firstChild.nodeValue function to get values with HTML tags also to are displayed.

    Thank you
    Vikas

    Vikas,

    Try to escape special characters:

    htf.escape_sc(:TEMPORARY_APPLICATION_ITEM)
    

    Kind regards
    Dan

  • Strange missing ID after using AJAX, when we have access to a new page.

    Hello everyone,

    I tried to set up a fully interactive page with AJAX. AJAX works very well, I refresh my page with several different page fragment. Do all kind of operation you want to do: creating, editing, deleting. But when it's time to go on a completely different page, I got the following error:

    The item ID (2464497127879027704) error is not set on the current page.

    I'm looking and I don't know what is element (2464497127879027704)? You have an idea?

    Thank you for your suggestions?

    persona4-77,

    You use Ajax to pull the items from another page in your current page. When you submit the current page and will the apex to bind the value of the session state then it error because there are one or more elements that should not be there. Chances are that these items are hidden on the other page. If so, simply change their type to "Show as text does not save the State" and set their status to 'never '.

    Kind regards
    Dan

    http://danielmcghan.us
    http://sourceforge.NET/projects/tapigen

    You can reward this answer by marking as being useful or correct ;-)

Maybe you are looking for