Ajax Implementation

I am using zip code search in my page.. Whenever I enter zip code, the state which is a drop down should get populated automatically on blur event of zip code text field or on change event after lookup at the server..
I want to know how can I achieve this using AJAX in my JSF page...It should also throw error message that particular zip code is not found without page getting refreshed on OnChange event.
Can somebody plz help me out?

Maybe this is what you need:
http://livedemo.exadel.com/a4j-dropDownBoxes/

Similar Messages

  • Ajax implementation on my JSP PAGE

    Hi..
    In my jsp page I am uploading *.XLS file and in the nest page I am Selecting the sheets in that .XLS file,
    I want to implement AJAX so that I can upload the (.XLS file) and select the sheets in the .XLS file in Single JSP file
    Can any one know how to implement?
    Thanks
    Mallik

    if you need ajax code, you re on the wrong forum :)

  • Question on AJAX implementation on java

    Hi! I'm very new to the concept of AJAX and I was hoping someone could help me out. Basically, I have an application that needs to implement AJAX to speed up the transaction.
    What the program does is it has a dropdown box which has dates. After the user selects a date and clicks the submit button, the server returns a user from the database.
    My question is, how do I implement AJAX here? If it is possible, please guide me with this since I barely know how and where to start.
    Thanks!

    russcals wrote:
    Hi! I'm very new to the concept of AJAX and I was hoping someone could help me out. Basically, I have an application that needs to implement AJAX to speed up the transaction.Then you're using it for the wrong reasons
    What the program does is it has a dropdown box which has dates. After the user selects a date and clicks the submit button, the server returns a user from the database.Interesting. So what's the relationship between date and user, and how is that going to speed up "the" transaction?
    My question is, how do I implement AJAX here? If it is possible, please guide me with this since I barely know how and where to start.
    Thanks!You barely know where to start with Ajax? I see a bright future in web development for you, then, since nobody else that uses it seems to have a clue, either

  • Ajax implementation in portlert.

    Hi,
    I have a Question on Inter Portlet Communication.
    i have a page which consists 2 portlets.
    On the 1st portlet i have one link ,now my question is how can i show the data in the 2nd portlet by clicking on the link of the 1st portlet.
    And the data which will come in the 2nd portlet should
    only come and the whole screen should not get refreshed,so its like a Ajax portlert.
    So basically i want to know how to get data on the 2nd portlet by clicking the link on the 1st portlet and how to make the portlet a Ajax portlet.
    Can somebody plz help me out in this regard

    hi,
    i am very new to this weblogic portal and currently i am working on weblogic server 10. i have worked little bit on 8.1 too, but i found this version 10 more user friendly.i have not started working on ajax support but in this days i worked like passing data in same portlet between different jsf pages. i used backing file, form bean and service control to pass the data between differnt jsf in the same portlet. i dn't know whether this will help u or not. currently i am working on passing the data between different portlets (without ajax). as soon as i will get some knowledge i will let u know.

  • AJAX issue with + sign

    I got a strange issue during AJAX impelementation
    in our database we have two columns
    where one column is having the data as A+B+C and second column is BCD
    we retrieve the data of secod column based on the first column thrugh AJAX implementation
    But second column data is not coming as it picks the data in query of first column as A B C (i.e. it ignores + sign)
    Please let me know why it is doing that
    ~Aman

    Are you actually using A+B+C as part of the URL for the AJAX request?
    The plus sign (+) is a special character when dealing with URLs and if you want it to end up at the server as a plus sign you have to urlescape it.

  • Ajax with Portal 8.1

    Has anyone implemented any AJAX functionality within Portal 8.1. If so, could you please provide some examples.
    Kunal Mittal

    Hi,
    I have recently used AJAX in the portal environment. The following link provides you with an example for an Ajax implementation within a portal:
    https://codesamples.projects.dev2dev.bea.com/servlets/Scarab/remcurreport/true/template/ViewIssue.vm/id/S188/nbrresults/185
    Further I found some interesting examples on http://www.openrico.org
    Hope that helps...
    Cord

  • Opening a New page on click of a link in Struts PDK portlet

    Hi All,
    Please help me to sort out my issue..
    I created a portlet(say P1) using struts Portlet.That portlet is added to a portal page..which has some other portlets already(p2,p3,p4)...So my portal page has 4 portlets p1,p2,p3,p4..In Portlet P1 There is JSP which has a link inside...When i click on the link..I need to open a new JSP page with some prepopulated data inside it..Now the problem is..it is opening a page with data..but in the new page i am seeing all the remaining portlets as well..P1(with new data),P2,P3,P4 portlet..
    But i need to see only the JSP page with my new content..please help me with this..
    Here is the code...what i have written
    INDEX.JSP
    <%@ page contentType="text/html; charset=windows-1252"
    import="java.io.File, java.io.FilenameFilter"
    %>
    <%@ taglib uri="/WEB-INF/tlds/struts/pdk-struts-html.tld" prefix="html" %>
    <html>
    <head>
    <title>
    Struts Sample Portlet - Hello World...
    </title>
    <body>
    <html:link action="/sayActionHello" target="_blank">My Link</html:link>
    </body></html>
    ACTION CLASS
    public class SayHelloAction extends Action {
         public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
    System.out.println("Inside execute ................................");
    PortletRenderRequest pReq = (PortletRenderRequest)
         request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    ProviderSession pSession = pReq.getSession();
    if(null != pSession){
         System.out.println("Inside---pSession...........................");
         pSession.setAttribute("sample","Sample Data for Testing");
    return mapping.findForward("success");
    Provider.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
    <session>true</session>
    <passAllUrlParams>true</passAllUrlParams>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>1</id>
    <name>samstruts</name>
    <title>samstruts</title>
    <description>sample struts Portlet Description</description>
    <timeout>40</timeout>
    <showEditToPublic>false</showEditToPublic>
    <hasAbout>false</hasAbout>
    <showEdit>false</showEdit>
    <hasHelp>false</hasHelp>
    <showEditDefault>false</showEditDefault>
    <showDetails>false</showDetails>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <renderContainer>true</renderContainer>
    <renderCustomize>true</renderCustomize>
    <autoRedirect>true</autoRedirect>
    <contentType>text/html</contentType>
    <showPage class="oracle.portal.provider.v2.render.http.StrutsRenderer">
    <defaultAction>/sayHello.do</defaultAction>
    </showPage>
    </renderer>
    </portlet>
    </provider>
    Strutss-config
    PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <action-mappings>
    <action path="/sayHello" scope="session" type="com.up.tey.SayHelloAction">
    <forward name="success" path="/jsp/index.jsp"/>
    </action>
    <action path="/sayActionHello" scope="session" type="com.u p.tey.SayHelloAction1" input="/htdocs/jsps/index.jsp">
    <forward name="success" path="/jsps/indexsample.jsp"/>
    </action>
    </action-mappings>
    </struts-config>
    Indexsample.jsp
    <%@ page contentType="text/html; charset=windows-1252"
    import="java.io.File, java.io.FilenameFilter"
    %>
    <%@ taglib uri="/WEB-INF/tlds/struts/pdk-struts-html.tld" prefix="html" %>
    <html>
    <head>
    <title>
    Struts Sample Portlet - Hello World...
    </title>
    <body>
    <h1>HELLO WORLD Sample using Struts !!!!!!<%=session.getAttribute("sample")%></h1>
    </body></html>
    In new window i am cing Indexsample.jsp inside my P1 portlet..But the remaining 3 portlets(p2,p3,p4) are also there..Which i dont want..Please Help..this is really very urgent for me..

    HI
    i am also facing same problem with session but in simple portlet with ajax implementation.
    i am setting session in portlet jsp with following code using oracle application server portal 10g.
    (here portlet jsp means which is included from portlet.)
    session.setAttribute("map",map);(here session is implicit object )
    i want to call ajax jsp from portlet jsp with below code.(i.e setting session in portlet jsp and accessing in ajax jsp)
    var url = "<%=renderRequest.getContextPath()%>/AjaxProcessRequest.jsp?q=" + random;
    var pars = '&namespace=<portlet:namespace/>' +'&imagesPath=' + '<%=imagesPath%>';
    var myAjax = new Ajax.Updater(
    {success: 'emailbody'},
    url,
    method: 'get',
    parameters: pars,
    onFailure: reportError,
    evalScripts: true
    i am accessing map object from session in my AjaxProcessRequest.jsp as shown in below code.
    Map map=(Map)session.getAttribute("map"); (here session is implicit object )
    here map object is getting null from session.
    Please help on this if u know about this session.
    Regards
    Raju

  • OracleAS - NULL ProviderSession after 15 minutes (Using Oracle PDK Portlet)

    We have recently deployed an oracle pdk portlet java application (developed in JDeveloper 10.1.2.1) to an OC4J on a server running OracleAS 10g (9.0.4).
    We are currently facing issues where our ProviderSession becomes null after 15 minutes.
    In our jsp's we implement the following:
    PortletRenderRequest pReq = (PortletRenderRequest) request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    ProviderUser pUser = pReq.getUser();
    ProviderSession pSession = pUser.getSession(false); In our provider.xml file within our JDeveloper project/portlet we have set the following tag: <session>true</session>. In the provider itself, under the User/Session Information section, we have selected the User option, set the Login Frequency to Once Per Session and checked the box labeled 'Require portal user specific session information'.
    In our web.xml file within our JDeveloper project/portlet we have set the following tag: <session-config><session-timeout>35</session-timeout></session-config>
    As long as we stay within our portlet we don't seem to lose our ProviderSession, but after 15 minutes, if we try to access the portal page (to switch the language on the page for instance) the ProviderSession is null. This operation always works when we are under this 15 minute limit.
    We have tried to change opmn.xml (increasing OC4J start timeout from 900 seconds to 1200 seconds),
    modplsql conf (PlsqlIdleSessionCleanupInterval, changed from 15 to 30 minutes) and we have also tried disabling the Global Inactivity Timeout variables, but no luck as of yet.
    Any help would be much appreciated !
    Thanks

    HI
    i am also facing same problem with session but in simple portlet with ajax implementation.
    i am setting session in portlet jsp with following code using oracle application server portal 10g.
    (here portlet jsp means which is included from portlet.)
    session.setAttribute("map",map);(here session is implicit object )
    i want to call ajax jsp from portlet jsp with below code.(i.e setting session in portlet jsp and accessing in ajax jsp)
    var url = "<%=renderRequest.getContextPath()%>/AjaxProcessRequest.jsp?q=" + random;
    var pars = '&namespace=<portlet:namespace/>' +'&imagesPath=' + '<%=imagesPath%>';
    var myAjax = new Ajax.Updater(
    {success: 'emailbody'},
    url,
    method: 'get',
    parameters: pars,
    onFailure: reportError,
    evalScripts: true
    i am accessing map object from session in my AjaxProcessRequest.jsp as shown in below code.
    Map map=(Map)session.getAttribute("map"); (here session is implicit object )
    here map object is getting null from session.
    Please help on this if u know about this session.
    Regards
    Raju

  • Very urgent: call servlet from JSP

    Hello,
    I'm facing a problem in invoking a servlet from a JSP having the JSF components.
    The application has a text field to implement ajax for search functionality in the database .I have written a servlet to make the database connection and fire the querry.
    Ajax implementation in a js file is called on every keyup event in the jsp file,and
    a call is given to the servlet from the ajax methode.
    The function in the js file is as follows:-
    function getPersonByFirstNameXML( firstName ) {
        if (!firstName) {
            clearPersonByFirstNameXML();
        } else {   
            var url = BASE_URL + "/servlet/get_PersonsXML";
            alert(url);
            return new AJAXRequest("post", url, "firstName=" + encode(firstName), processGetPersonByFirstNameXML);
    }Im getting the myAJAX.status value as 500.
    I think I'm not able to access the servlet properly.
    what changes do i need to make in the we.xml file ?
    and what should be the url to be passed.
    Please provide me a sloution to the above problem as it is very urgent else if anybody is aware of a readymade JSF componet with search functionality freely available please let me know.
    PS:
    The sample application named RedirectionExample which makes use of a servlet and would be of help to you. You can find the tutorial on the following page:
    http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
    is not available as stated in some of the suggestions by Author: mayagiri
    Thanks for any help.
    Abhi

    the status 500 generally means either HTTP server internal error or that execution of CGI script or servlet aborted with error.
    It can be reasonably supposed that the request reaches the servlet, ie. that "url" value points to some existing servlet, otherwise most probably the status value would be 404.
    To test that the servlet is working i'd try to access it using some simple html page with form like this (with {BASE_URL} replaced by real value):
    <form method=post action={BASE_URL}/servlet/get_PersonsXML>
    <input type=text name=firstName>
    <input type=Submit>
    </form>

  • Creating Dynamic Drop-Down Menus

    Hello,
    I am a beginner to CF and web programming, but I have a good
    understanding of how things work (and I have a good course, hehe. )
    I have created a small page that has several select menus that are
    populated by database queries, however, I would like them to
    populate differently depending on what has been selected on the
    previous one. How can I populate a drop-down menu in real-time
    based on the selection on another one? I know I would need to have
    different queries for each option, but I have no further info on
    what I should use. Help please? Thanks in advance!

    you can go 2 routes.
    1 is to create a JavaScript array and use the onchange event
    of select #1 to parse that array and populate select #2 based on
    the elements within that array position. not fun if you're not into
    JS...but a good way to get familiar with JS :)
    2 is to use AJAX. JSMX is a very easy to use AJAX library (
    http://www.lalabird.com) and I
    think you'd be able to implement it with minimal efforts.
    Adobe also has its SPRY AJAX library...but it's currently in
    development and while there is no shortage of code samples
    (including one to do a "related select" if memory serves), there's
    no formal API documentation yet.
    oh...i guess there's an undocumented 3rd option. there's a
    custom tag called two_selects_related (or something similar).
    essentially what it does is creates that JS array (mentioned in
    option 1) for you using CF.
    I'd kind of lean towards the AJAX implementation myself
    (using either Spry or JSMX or the AJAX library of your choice). but
    that's just a matter of opinion. Others might suggest the custom
    tag route. Your call :)

  • Javascript based on PL/SQL function.

    Hey all,
    I'm developing an application with Apex and have run into a problem.
    I have a form page with the standard create, delete and cancel buttons. I need to be able to click the Create button, which will run a PL/SQL query, and based on the return of the function, either just continue the Insert to the table, or generate a popup warning, and then complete the table insert.
    I was thinking of having a Process that ran the javascript, and was conditional on the PL/SQL query, however i haven't had much luck.
    Any help appreciated.
    Thanks,
    Brett Crowley.

    Hello Brett,
    >> I was thinking of having a Process that ran the javascript, and was conditional on the PL/SQL query, however i haven't had much luck.
    APEX Processes are server-side resources, while JavaScript is a client-side resource. As such, you can’t invoke JavaScript code from within a PL/SQL code. However, the reverse direction – invoking PL/SQL code from a JavaScript code – is possible by using AJAX. In general, using AJAX allows you to call to an APEX on-demand PL/SQL (application) process, which in turn can return a result to the calling JavaScript code. In this point, based on the returned result, you can decide whether to issue an alert box or (programmatically) submit the page for further processing.
    This forum includes many example of using AJAX, and I believe that the following article can also be a helpful starting point.
    http://www.packtpub.com/article/ajax-implementation-apex
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • Create and commit does not work

    Hi,
    I have a Creation form in which I have a auto-suggest box(using ajax) and a ediable table.
    I have Create button and Commit button dragged from the Data Control Palette.
    But they dont work?
    Is it becoz of the Ajax which i have kept?
    Also Can anyone suggest a doc which explains what happens actually when a create/commit button is clicked.

    Hi,
    the create and commit buttons execute method bindings (operations if using ADF BC) on the binding layer.
    Not sure if this has to do with you Ajax implementation because this is what only you can tell from looking at your code. Change the "create" binding in the pageDef file to reference "CreateInsert" if using ADF Business Components. This will create a new row.
    Note that the commit button is disabled until a change has been submitted
    Frank

  • Editable drop-down problem.

    Hello all,
    Here's the issue. I have an editable dropdown list/menu in a table. The table is hidden upon page load. When the user clicks the link to open the table, the editable drop down is only 1 or 2 pixels wide. How do I get the editable drop down to open at the prescribed 300px?
    Here's the code:
    <select name="CGSector1" id="CGSector1" wdg:subtype="DynamicInput" wdg:type="widget" wdg:recordset="rsCGSectors" wdg:displayfield="CGSectors" wdg:valuefield="CGSectors" wdg:norec="150" wdg:singleclickselect="yes" wdg:defaultoptiontext="no" wdg:restrict="No" wdg:ext="php" style="width:300px" wdg:fakeattribute="<?php WDG_registerRecordInsert("connStr_xxxxxx", "rsCGSectors", "CGSectors", "CGSectors");?>"></select>
    Thank you.
    Brian

    As this issue is not directly related to ADDT, but assumingly rather to e.g. aspects like the defined (if any) width of the initially hidden table, please give a link to the complete page code (or a live page) to help others with spotting the possible reason for this.
    However it should be mentioned that ADDT´s "editable dropdown" is generated on-the-fly using some proprietary AJAX functionality as well (including the style rendering), so maybe the style setting you defined here just gets ignored when the surrounding "container" (aka the table) gets hidden by - for instance - using features from another AJAX library like JQuery which is certainly incompatible with than ADDT´s own AJAX implementation.
    Cheers,
    Günter

  • After a Primary Key is chosen, how can I display just a corresponding row?

    Hi everyone,
    I have a LOV field in which the user is able to select a primary key. Now I would like to show the user some more information, after he has chosen an item, like a name to the coressponding item.
    Example: Table: Dataobject
    Primary key: DOBJ_NR
    Other fields: NAMSP
    After the user choses his dobj_nr, he should be able to see the namsp.
    Can anyone help me?

    I have a LOV field in which the user is able to select a primary keyMake it select list with Submit
    Create a after computations to populate other fileds based on primary key value.
    Computation type: SQL
    and computation source something like..
    SELECT NAMSP
    FROM Dataobject
    WHERE DOBJ_NR = :P1_DOBJ_NRIf you don't want to SUBMIT the page, see this link for AJAX implementation for the same.
    Regards,
    Hari
    Don't forget to reward helpful replies by marking them as helpful or correct ;-)
    Edited by: Hari_639 on Dec 1, 2009 6:02 PM

  • Tutorial using Oracle database & ADFBC/JSF

    Hello
    I needed to create a web application which will use Oracle as a database and JSF and ADF BC. I wanted to know what are the steps to creating such an application? Any link, pdf, tutorial?
    Also what is the advantage of using JSF/ADF BC.. i.e., as my web application has to have AJAX implementation too, so which one is better suited?
    Please do provide the necessary guidance. Thanks in advance.

    Have a look at the JDeveloper tutorials page on OTN.
    http://www.oracle.com/technology/obe/obe1013jdev/index.htm
    Also see the ADF learning center for more in-depth tutorial and book:
    http://www.oracle.com/technology/products/adf/learnadf.html
    Using JSF with ADF Faces will get you all sorts of Ajax like capabilities. see for example:
    http://download.oracle.com/otn_hosted_doc/jdeveloper/11/demos/adffacesria/adffacesria.html

Maybe you are looking for

  • How do I get my calendar and contacts data to sync to computer?

    After instal of Maverick, iPhone data syncs to iCloud, but not to computer.  How do I get my calendar and contacts data to sync to computer?

  • ALV Output need to send to Printer

    Hi Folks, I need to send the ALV output to the printer. I built the ALV in OOps. The printer button is enabled in the scrren and when I give print it is goint to dump Below I have pasted the dump. Help me to solve this. Points will be rewarded. Regar

  • Help move photos from editor to organizer

    This should be an easy task and I am familiar with editing a photo taken from the organizer and then returning it to an album or folder.  My problem is with a photo sent to me as an attachment to an email in another program (often Picasa).  This phot

  • --- welcome to IDES 4.7 Enterprise ---

    HI frns iam working on SAP r/3 server 4.7ee. and when open SAP GUI i will find a message on the GUI --- welcome to IDES 4.7 Enterprise --- and now i want to change tht message how can i do tht....plz help me with detailed steps...

  • Can't access a mailbox - error message "unexpected response format"

    I went to look at mail message in one mailbox. At first it said that it was having difficulty downloading from the server. I closed and opened the mail program and then I couldn't even get that message. I went over to ".mac" to see if I could view th