Data fetch without Refresh

hi Friends,
I have a problem i want to extract data from table without refresh into text field when i'll enter any value in a text field then corressponding value should come in to corressponding textfield.
eg. when i enter emp_id 101 in a text field then the first_name and last_name ,adress should come in to corressponding text fields without refresh.
How Can I do this.
Thanks
Manoj

Hi,
Firstly, you would find it easier not to use x.something in the tag names in your process (I'm not sure if they are allowed, but I would avoid the dots anyway!). So:
DECLARE
vCLASSID VARCHAR2(100);
vSECTION VARCHAR2(100);
vFNAME VARCHAR2(100);
vLNAME VARCHAR2(100);
BEGIN
owa_util.mime_header('text/xml', FALSE );
htp.p('Cache-Control: no-cache');
htp.p('Pragma: no-cache');
owa_util.http_header_close;
SELECT C.CLASS_ID,C.SECTION,S.F_NAME INTO vCLASSID, vSECTION, vFNAME,vLNAME FROM CLASS_RECORD C INNER JOIN STUDENT_PERSONAL_DETAILS S ON
C.STUDENT_ID = S.STUDENT_ID WHERE C.STUDENT_ID = :STUDENTID
htp.prn('<DATA>');
htp.prn('<CLASS_ID VALUE="' || vCLASSID || '"></CLASS_ID>');
htp.prn('<SECTION VALUE="' || vSECTION || '"></SECTION>');
htp.prn('<F_NAME VALUE="' || vFNAME || '"></F_NAME>');
htp.prn('<L_NAME VALUE="' || vLNAME || '"></L_NAME>');
EXCEPTION WHEN OTHERS THEN
htp.prn('<DATA>');
htp.prn('<CLASS_ID VALUE="No such CLASS NAME!"></CLASS_ID>');
htp.prn('<SECTION VALUE="No such SECTION!"></SECTION>');
htp.prn('<F_NAME VALUE="No such First Name!"></F_NAME>');
htp.prn('<L_NAME VALUE="No such First Name!"></L_NAME>');
htp.prn('</DATA>');
END;I've also completed the EXCEPTION output as well so that both possibilities use DATA and /DATA
This does assume that you have an Application Item called STUDENTID and that your Application Process is called SCS and is an "On Demand" process
Now, the javascript... Firstly, you can't include dots in the var names as this identifies a property or attribute or function of an item (for example, document.location.href). Secondly, you should use the same upper/lower case text for the XML tag names as you used in the process - if you stick with uppercase throughout it is easy to remember. So, I've removed the dots and made the XML tag references uppercase:
<script type="text/javascript">
function getEmployeeInfo(filter)
  var xml = null;
  var get = new htmldb_Get(null, $v('pFlowId'), 'APPLICATION_PROCESS=SCS', 0);
  get.add('STUDENTID', filter.value);
  ret = get.get('XML');
  if(ret)
    var class_idItems = ret.getElementsByTagName("CLASS_ID");
    if (class_idItems)
      var class_id = document.getElementById("P314_CLASS_ID");
      class_id.value = class_idItems[0].getAttribute("VALUE");
    var sectionItems = ret.getElementsByTagName("SECTION");
    if (sectionItems)
      var section = document.getElementById("P314_SECTION");
      section.value = sectionItems[0].getAttribute("VALUE");
    var f_nameItems = ret.getElementsByTagName("F_NAME");
    if (f_nameItems)
      var f_name = document.getElementById("P314_STUDENT_NAME");
      f_name.value = f_nameItems[0].getAttribute("VALUE");
    var l_nameItems = ret.getElementsByTagName("L_NAME");
    if (l_nameItems)
      var l_name = document.getElementById("P314_STUDENT_NAME");
      l_name.value = l_nameItems[0].getAttribute("VALUE");
  get = null;
</script>If you try those, does it now work?
Andy

Similar Messages

  • How can we update the date&time without refreshing the page

    Hi friends,
    I have a jsp page. In that there is Date and Time. The date and time should be updated for every one minute without refresh the page(dynamically).
    Its urgent for me
    Thanks
    Mallik

    hello friend ru looking at date and time @ client side frm the server side if it is all about the client side date i don't think there is use of AJAX triggers and rendering the view by modifying the dom...
    here is an example for you..
    <%@ page language="java"%>
    <HTML>
    <HEAD>
    <SCRIPT language="JavaScript">
    function startclock()
    var thetime=new Date();
    var nhours=thetime.getHours();
    var nmins=thetime.getMinutes();
    var nsecn=thetime.getSeconds();
    var nday=thetime.getDay();
    var nmonth=thetime.getMonth();
    var ntoday=thetime.getDate();
    var nyear=thetime.getYear();
    var AorP=" ";
    if (nhours>=12)
        AorP="P.M.";
    else
        AorP="A.M.";
    if (nhours>=13)
        nhours-=12;
    if (nhours==0)
       nhours=12;
    if (nsecn<10)
    nsecn="0"+nsecn;
    if (nmins<10)
    nmins="0"+nmins;
    if (nday==0)
      nday="Sunday";
    if (nday==1)
      nday="Monday";
    if (nday==2)
      nday="Tuesday";
    if (nday==3)
      nday="Wednesday";
    if (nday==4)
      nday="Thursday";
    if (nday==5)
      nday="Friday";
    if (nday==6)
      nday="Saturday";
    nmonth+=1;
    if (nyear<=99)
      nyear= "19"+nyear;
    if ((nyear>99) && (nyear<2000))
    nyear+=1900;
    this.document.getElementById("clockspot").innerHTML = "<b>"+nhours+": "+nmins+": "+nsecn+" "+AorP+" "+nday+", "+nmonth+"/"+ntoday+"/"+nyear+"</b>";
    setTimeout('startclock()',1000);
    </SCRIPT>
    </HEAD>
    <BODY>
    <div id="clockspot"></div>
    <SCRIPT language="JavaScript">
    startclock();
    </SCRIPT>
    </BODY>
    </HTML>hope this might help :)
    REGARDS,
    RaHuL

  • Data fetch from table without Refresh and without using tab key.

    hi Friends,
    I have a problem i want to extract data from table without Refresh into text field without using Tab key. when i'll enter any value in a text field then corressponding value should come in to corressponding textfield without using Tab Key.
    eg. when i enter emp_id 101 in a text field then the first_name and last_name ,adress should come in to corressponding text fields without refresh and without using Tab key.
    How Can I do this.
    Thanks
    Manoj

    Hi Manoj,
    I assume that this is similar to: Data fetch without Refresh rather than Re: Value of one textfield should come into another textfield Without Using TAB ?
    If so, the only change you need to make on the first one is to use "onkeyup" instead of "onchange" in the item's "HTML Form Element Attributes" setting.
    Note, however, that the user must move away from the item at some point (for example, to click a button), so the onchange will be triggered anyway.
    Andy

  • Data fetch from two table without refresh

    hi Friends,
    I have a problem i want to extract data from two table without refresh into text field when i'll enter any value in a text field then corressponding value should come in to corressponding textfield.
    eg. there two table A and B.
    Table A has Colunm
    s_id Number;
    c_id Varchar2(30);
    sec varchar2(4);
    Second Table B Colunm Name
    s_id Number;
    f_name varchar(30);
    l_name varchar(20);
    when i enter s_id 101 in a text field then the c_id ,sec,first_name and last_name should come in to corressponding text fields without refresh.
    How Can I do this.
    Thanks
    Manoj

    Hi Manoj,
    You have to make an Ajax call to display data without refreshing the page. Search this forum for Ajax and you can find lots of related posts. This link might help too. http://www.dba-oracle.com/t_html_db_apex_ajax_application_express.htm
    Thanks,
    Manish.

  • How to insert a new field without refreshing the data

    Hi,
    I have data of 3 years in a cube. I have to enhance a new field in that cube and i want the data will come from now onwards. I dont wanna have the data for the past 3 years.
    Can anyone tell me how i can load the data of that field into the cube without refreshing the cube as cube has too much data.
    Roma

    Hi Roma,
    It depend up on whether you are adding Cgharacteristic or Key figure. If you are adding key figure then no need to worry.
    Just create the new keyfigure, add this in all your data flow and activate all the objects and assign proper transformation.
    from next load you will get data for this field.
    If you are addign data the this is a bit difficult than key figure. addign characteristic is nothing but you are making changes to your cube dimensions.
    when you are changing your cube dimensions, you should delete the data before you transport the objects.
    You can try once to transport the objects with out deleting data. If it fails then you have to delete the data from Cube.
    Regards,
    Venkatesh.

  • Cursor tips : refresh data fetched by the cursor within run time,discussion

    Hello there,
    May be what I am asking about is kind of weird, but here is the Q:
    let us assume that I have cursor defined as follows:
    cursor emp_cursor is
            select EMPNO, ENAME, deptno
            from emp
            where deptno = 10 ;
    emp_rec  emp_cursor%rowtype;  then inside the loop through the data fetched by this cursor, I need to update some records, which might match the criteria of the cursor, by trying the following code segment:
    open emp_cursor;
          loop
            fetch emp_cursor into emp_rec;
            exit when emp_cursor%notfound;
            "PROCESS THE RECORD'S DATA "
            DBMS_OUTPUT.Put_Line('count of the records: ' || emp_cursor%rowcount);
            DBMS_OUTPUT.Put_Line('deptno: ' || emp_rec.deptno);
            DBMS_OUTPUT.Put_Line('emp no: ' || emp_rec.empno);
            update emp
            set deptno = 10
            where empno= 7566;
            commit;
            DBMS_OUTPUT.Put_Line('after the update');
          end loop;
          close emp_cursor; but the run never shows the record of employee 7566 as one record of the cursor, may be this is the execution plan of the cursor,
    but for the mentioned case, need to re-enter those updated records to the cursor data, to be processed, ( consider that the update statement is conditioned so that not executed always)
    any hints or suggestion
    Best Regards,

    John Spencer wrote:
    Justin Cave wrote:
    Not possible. You'd have to close and re-open the cursor in order to pick up any changes made to the data after the cursor was opened.Then close and re-open it to get any changes made while processing the second iteration, then close and re-open it to get any changes made while processing the third iteration ad infinitum :-)I'm not claiming there are no downsides to the process :-)
    On a serious note, though, the requirement itself is exceedingly odd. You most likely need to rethink your solution so that you remove this requirement. Otherwise, you're likely going to end up querying the same set of rows many, many, many times.
    Justin

  • Firefox Version 27 Reporting Services Action Menu Error. An error has occurred with the data fetch.

    Hello, since I've updated to Firefox 27.0.1 on Windows 7, I'm encountering a problem with Reporting Services on a Sharepoint site. It is a Sharepoint 2010 site with SQL Server Reporting Services 2012 Sharepoint Integrated mode. I was previously on Firefox version 26 and didn't encounter this problem.
    When a report is open and you use the Actions link on the Reporting Services toolbar, I receive the following error messages.
    An error has occurred with the data fetch. Please refresh the page and retry.
    I've tried updating to Firefox 28 beta but the same error occurs. I see another user is having the same problem here. http://sharepoint-community.net/forum/topics/reporting-service-and-firefox-27
    Any help would be appreciated. Thanks!
    Ryan

    Rachel, I did perform the Sharepoint file alteration discussed in the other article and it did stop Firefox from producing the error. I've done some testing on some other browsers and have yet to encounter any problems with the fix however I'm hesitant to perform that workaround in a production environment.
    Thanks for looking.
    Ryan

  • Calculate Monthly Salary Without Refresh

    hi,
    i have to calculate salary .i have two select list one for emp_id and second for month.
    when i select emp_id then Emp_name and Salary are coming into text field.
    i want to calculate Advance Salary of Employee ,which is he take in between month and also calculate per day salary .
    i have done this by using code
    i use That code for calculate per Day SALARY
    declare
      l_var   number := 0;
    BEGIN
    IF :P65_MONTH ='JAN' THEN
       l_var := :P65_SALARY1/31;
    RETURN ROUND(l_var,2);
    ELSIF :P65_MONTH ='FEB' AND MOD(TO_CHAR(SYSDATE,'YYYY'),4)!=0 THEN
       l_var := :P65_SALARY1/28;
    RETURN ROUND(l_var,2);
    ELSIF :P65_MONTH ='FEB' AND MOD(TO_CHAR(SYSDATE,'YYYY'),4)=0 THEN
    l_var := :P65_SALARY1/29;
    RETURN ROUND(l_var,2);
    ELSIF :P65_MONTH ='MAR' THEN
    l_var := :P65_SALARY1/31;
    RETURN ROUND(l_var,2);
    ELSIF :P65_MONTH ='APR' THEN
    l_var := :P65_SALARY1/30;
    RETURN ROUND(l_var,2);
    ELSIF :P65_MONTH ='MAY' THEN
    l_var := :P65_SALARY1/31;
    RETURN ROUND(l_var,2);
    ELSIF :P65_MONTH ='JUN' THEN
    l_var := :P65_SALARY1/30;
    RETURN ROUND(l_var,2);
    ELSIF :P65_MONTH ='JUL' THEN
    l_var := :P65_SALARY1/31;
    RETURN ROUND(l_var,2);
    ELSIF :P65_MONTH ='AUG' THEN
    l_var := :P65_SALARY1/31;
    RETURN ROUND(l_var,2);
    ELSIF :P65_MONTH ='SEP' THEN
    l_var := :P65_SALARY1/30;
    RETURN ROUND(l_var,2);
    ELSIF :P65_MONTH ='OCT' THEN
    l_var := :P65_SALARY1/31;
    RETURN ROUND(l_var,2);
    ELSIF :P65_MONTH ='NOV' THEN
    l_var := :P65_SALARY1/30;
    RETURN ROUND(l_var,2);
    ELSIF :P65_MONTH ='DEC' THEN
    l_var := :P65_SALARY1/31;
    RETURN ROUND(l_var,2);
    END IF;
    END;That code are used for Advance Payment to Employee in beetween month.
    select nvl(sum(RECEIPT_AMT),0) from EMP_SLRY_DTL where month=:P65_MONTH and emp_id=:P65_EMP_ID group by MONTH,to_char(sysdate,'yyyy'),emp_idHere Emp_name and Salary Comes without refresh into text field when i select Emp_id from select list.
    but when i select Month from select list then page is refresh because i have to select Select list with submit .When page is refresh then Advance amount and per dat salary comes in to text field.
    I want this without refresh ,when i select month then advance salary and Per Day salary shound Come in to text Field.
    How Can i do this,
    Thanks

    You can do this by using Ajax, and possibly even Dynamic actions.
    1. Onchange on the Select List calla JS function and pass the EMP_ID to the function
    2. Write an Application process that fecthed the name and salary. You can concat the two values with a ':', or use JSON , and return it using htp.p from the application process (On Demand)
    3. In the JS function in step 1 make an ajax call to the OnDemand process
    4. Use $s API to write the returned values into the Pafe Items.
    Regards,

  • Display error message without refreshing the entire jsp

    Hi,
    I want to display the server side error messages in the jsp without refreshing the entire jsp. How can this be achieved?
    I think there is some way with use of AJAX. If yes can you please elaborate on the same as to how to do this.
    Regards,
    Shwetha

    In the project it's presented:
    1) how the servlet can send JSON data depending on the request's parameter
    2) how to obtain this data on the client side and show in on the page using jQuery without refreshing the whole site
    What You need to do is just to send the error (as JSON data) insetad of the values that are passed now and display this error on the page.

  • Profile error: Memory access violation (data fetch)

    Hello,
    I have VI with a lot of mathematic Nodes. When I try to profile it, I allways get this error: "Memory access violation (data fetch)".
    Keil uVision shows this error:
    "Memory write not possible (Real-Time Agent)
    Memory read not possible (Real-Time Agent)"
    Without profiling the VI works on the MCB2400. And profiling also works if I try very simple examples.
    bye & thanks
    amin

    Hi Amin, Alex,
    I noticed this issue had been open for some time, so I decided to post directly to save time.
    Thanks,
    Jaidev Amrite
    LabVIEW Embedded PSE
     Diagnosis: So apparently, this behavior has nothing to do with the profiler. The culprit is the Advanced Analysis SubVI call (Mean.vi) in BB.vi. 
    Mean.vi has a call library function node inside it and this CLN is configured to run in its own thread (labVIEW spawns a new thread for each call). Probably due to bad thread management on the ARM (in this case), this call causes a memory violation. 
    Solution:Turn off the "Run in any thread" setting on the CLN as shown in the attached screenshot - change it to "Run in UI Thread". For good measure also turn off reentrancy on Mean.vi (second screenshot)
    National Instruments
    LabVIEW Embedded Product Support Engineer

  • UIX validation in editable table without refreshing

    I have an editable table in a UIX page and I want to validate some fields against the DB (when the focus of each textInput is lost) without refreshing the table (to keep in the textInputs the data previously introduced by de user). To obtain that I pass the value that I want to validate to a second form (using javascript) which is submitted using the javascript function submitForm.
    How can I do to keep the table without refreshing?
    Here is the code:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title="Maestro Ficheros"/>
    </metaContainer>
    <contents>
    <script>
    <contents>
    <![CDATA[function foco(){
         var n = document.form0.nombrefi.value;
         document.form1.param1.value = n;
         submitForm(document.forms[1],0,{'event':'Validar'});
    } ]]>
    </contents>
    </script>
    <body>
    <contents>
    <form name="form0">
    <contents>
    <table model="${bindings.Gccintt001View1}"
    id="Gccintt001View11"
    partialRenderMode="multiple"
    partialTargets="_uixState"
    nameTransformed="false">
    <contents>
    <column>
    <columnHeader>
    <sortableHeadermodel=
    "${ctrl:createSortableHeaderModel (bindings.Gccintt001View1, 'Nombrefi')}"/>
    </columnHeader>
    <contents>
    <switcher childName=
    "${uix.current.Nombrefi.inputValue==
    bindings.Nombrefi.inputValue ?
    'selected' : 'notselected'}">
    <case name="selected">
    <textInput id="nombrefi"
    model="${bindings.Nombrefi}"
    readOnly="false" columns="15"
    styleClass="OraBGAccentLight"
    onChange="javascript:foco()"/>
    </case>
    <case name="notselected">
    <textInput model="${uix.current.Nombrefi}"
    columns="15" readOnly="true"/>
    </case>
    </switcher>
    </contents>
    </column>
    <column>
    <columnHeader>
    <sortableHeader model=
    "${ctrl:createSortableHeaderModel (bindings.Gccintt001View1,'Descfichero')}"/>
    </columnHeader>
    <contents>
    <switcher childName=
    "${uix.current.Nombrefi.inputValue== bindings.Nombrefi.inputValue ?
    'selected' : 'notselected'}">
    <case name="selected">
    <textInput id="descfichero"
    model="${bindings.Descfichero}"
    readOnly="false" columns="15"
    styleClass="OraBGAccentLight"/>
    </case>
    <case name="notselected">
    <textInput model=
    "${uix.current.Descfichero}"
    columns="15" readOnly="true"/>
    </case>
    </switcher>
    </contents>
    </column>
    </contents>
    </form>
    <form name="form1" method="post">
    <contents>
    <formValue name="param1" value="vacio"/>
    </contents>
    </form>
    </contents>
    </body>
    </contents>
    </document>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    <event name="Validar">
    <method class="view.EventHandler" method="pruebaEventHandler"/>
    </event>
    </handlers>
    </page>
    Thanks Gari.

    I found a solution. Using a hidden form inside a iFarame and passing the values between forms with javascript, I can post the hidden form maintaining the changes in the table.
    Gari

  • How to data load without monitor entry?

    Hello,
    the atttibuts of a character are filled daily. There is no Request.
    Does anyone know, how I can find out from where the Data comes without monitor entrys?
    Thank you!
    SW

    Hi
    You can check whether any customised ABAP coding is used to fetch data from some data source and fill the related master data
    RSRD_ATTR_DEP - dependencies of attributes.....
    Like this, there can be some link tables which could be used in custom ABAP code to automatically fill the attribute values
    Bye
    N Ganesh
    assign points if useful**

  • How to open a report without refreshing  and sending some param value

    we have a summary report which has links to the detail report.For example the summary report has data like
    Countries        EmployeeCount
    UK                5
    US                6
    China                7
    Total                18
    When we click on China it must show the Employees whose country is China (detail report) When we click on Total it shows Employee of all countries UK,US,China...
    Now when we run the summary report online say at 5:10 it shows the staus of countries at 5:10.Say the report is open while an employee of china is moved from China to Uk.But when we open the detail report it shows China count as 6 which should actually be 7 according to the summary report run time.
    A similar problem exist when we schedule the report .When we schedule the summary report and detail report at same time..And then try to open the scheduled instance of detail report from summary scheduled instance ,It only works fine if no parameter is passed to openDocument url.
    Say suppose I click China on summary report the Value China should be passed to detail report as Country.But whenever we try to open a scheduled instance of Detail Report along with a parameter using openDocument Url.It refreshes the whole data even though refresh is set to 'N'.So the scheduled data is lost..Even if we try for Drillfilters in detail Report we cannot set it at runtime using open document Url.

    Mihail - I detailed a couple of approaches here: Re: Application Link
    Scott

  • How can we get a value in a drop down box without refreshing the page

    In my application i am having 14 drop down boxes. On selcting a particular value in a drop down box i am doing its corresponding functionality. I would like to get these values without refreshing the page each and every time i select a text box, Is it possible to get these values without refreshing the page each and every time.
    Raghu

    There is a new hype going on called AJAX. It is either that, or dumping a lot of information in javascript arrays and reading the information from there when you make selections. I would choose AJAX.

  • Passing javascript values to jsp without refreshing the page

    Hi,
    How do u pass a value of a javascript variable to the jsp without refreshing the page ?
    For example, a file called test.jsp in which a javascript variable x contains value 254. I need to pass the value of x to a method declared in test.jsp(same page).

    Hi Mona,
    when i say refresh i do mean a blink of the browser.
    This is a small example i wrote to show you how you can pass javascript varables to JSP variables. If you don't want the refresh to be seen by the user just include this code in a hidden frame on a page and instead of refreshing the entire page, refresh the hidden frame.
    i have to say, i didn't test the code so i don't guarantee it's flawless.
    if you need an more detailed example just tell me, i'll create one, but it won't be for today :)
    <html>
    <head>
         <title>Log in to the system</title>
    </head>
    <body>
    <script>
    //we retrieve the parameter 'user' from the URL
    <%
      String username = request.getParameter("user");
    %>
    var user = "<%= username%>";
    //check if there is a username in the URL
    if(user=="null")
      //there is no username so we log the person in as a guest
      user="guest";
      //we refresh the page and set the user parameter to 'guest'
      //the parameter now contains the javascript variable 'user'.
      //The parameter can be read by the JSP (see the top op this script).
      //This way we gave the javascript variabele to the JSP variable
      location="login.jsp?user="+user;
    else if(user=="guest")
    {  alert("Welcome "+user+", I hope you like this site"); }
    else
    {  alert("Welcome "+user+", I'm glad to see you again"); }
    </script>
    </body>
    </html>

Maybe you are looking for

  • Gif Animation Problem

    When i import a Gif Animation( Loop in QT Inspector) it works perfectly in Presentaion Mode but when i try to export it , the Animation will just play once thru and then Stop ! Can anybody confirm ? cheers, D

  • A JNLP based Java application is not running on JDK/JRE 1.7

    I am planning to upgrade users to java 7 up40. The generated command line that I am calling via the Process is working find when I run using jre1.6 but it doesn't work when I call javaw via jre1.7. Very strange that if i update xbootclasspath to use

  • Lock Object error during batch load

    Batch load was delayed about an hour. First error message in the Server Log said "Object is already locked by user""Error 1053010 processing request [Lock Object]-Disconnecting"Then it went through a series of "Object locked by user admin" and "recei

  • Cancellation of accounting document type "RV"

    Dear Folks We have created invoices and accounting documents created by them have wrong business area. Now we have set business area substitution and checked in development server it is correct. For the already created invoices, we want to cancel onl

  • Highlighting 3 elements at the same time...

    Please let me know if this is do-able, and if so, how. Picture a newspaper column : there's a picture on top, followed by text underneath, and some padding all around displaying only a paper-textured background image. MouseOver *any* portion of the c