JSP Servlet with AJAX Example

JSP Servlet with AJAX Example Ajax is a great feature implemented almost in all the websites in some way. It gives really a very good user interface, since things are loading/populating without refresh. It is commonly used in username availability checking, register/login page db level/business level validations etc. We are going to use Ajax with JSP and servlet to calculate

118 total views, no views today

» Read more

Alexa website rank script using PHP, jQuery, Bootstrap and Ajax

alexa website rank script using php, jquery & ajax

Alexa website rank script using PHP, jQuery, Bootstrap and Ajax: Alexa is a very popular and trusted site to give the rank for all the websites. It is a successful website ranking product of amazon. They are having many developer API to display every websites country and world rank. You can make use of this API to display any websites rank

140 total views, 1 views today

» Read more

PNR Status Script using PHP, jQuery and Ajax

PNR Status script featured image

PNR Status Script: Are you planning to develop any PNR alert, status website or any mobile apps ? (or) planning to integrate the PNR status script to your existing website. ?   We have provided here how to get the PNR status programmatically using third party API’s and provided the complete source code of the PNR Status Script. we have

822 total views, 25 views today

» Read more

JSON in Servlet with Ajax call

JSON in Servlet with AJAX call

JSON in Servlet with Ajax call: JSON is a amazing alternate for XML to pass/transfer the informations. It is required to know how to handle JSON in servlet. In servlet it can be handled like this, request.setCharacterEncoding("utf8"); response.setContentType("application/json"); // json is the JSON object. response.getWriter().print(json); But if you want to call your servlet through ajax, then we should handle the

156 total views, 2 views today

» Read more

Dynamically add/remove jsf components example

Program:   dynamic.xhtml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"> <h:head> </h:head> <h:body> <h:form> <h:dataTable value="#{dynBean.dynList}" var="myListElement"> <h:column> <h:panelGrid> <h:outputText value="www.javadomain.in"></h:outputText> </h:panelGrid> </h:column> </h:dataTable> <h:commandButton value="Add" action="#{dynBean.addToMyList}" /> <h:commandButton value="Remove" action="#{dynBean.removeFromMyList}" /> </h:form> </h:body> </html> DynamicBean.java: import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.faces.bean.CustomScoped; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import javax.faces.bean.ViewScoped; @ManagedBean(name =

374 total views, 4 views today

» Read more

Session Validation in Ajax

Session validation in servlet: Usually if it is a servlet we can simply check if(session != null ){ // Business code }else{ // Redirection code }   Session validation in ajax: If you call the servlet from ajax then the above steps won’t work, since ajax gets everything as response, so the code which you have written in the else

102 total views, no views today

» Read more

jQuery Bubble Popup onclick event sample program

Step 1:¬†Javadomain-jquery-bubble-popup.html <!DOCTYPE HTML> <html> <head> <title>jQuery Bubble Popup – Javadomain</title> <link href="jquery-bubble-popup-v3.css" rel="stylesheet" type="text/css" /> <script src="jquery-1.7.2.min.js" type="text/javascript"></script> <script src="jquery-bubble-popup-v3.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $(‘.mButton’).click(function() { var button_id = this.id.replace(‘link’, ‘button’); var button = $(‘#’ + button_id); if ($(‘.mButton’).HasBubblePopup()) { alert(‘Bubble popup already opened’); return false; } $(‘.mButton’).CreateBubblePopup(); // bubble popup created var button_click = $(this); // clicked

154 total views, 1 views today

» Read more

Ajax Calling in jQuery

Step 1: ¬†Callingajax.html <!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”> <html> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1″> <title>Javadomain example</title> </head> <script src=”scripts/jquery-1.9.0.min.js” type=”text/javascript”></script> <script type=”text/javascript”> $(document).ready(function() { $(‘.button’).click(function() { $.ajax({ url : “sample.html”, type : “GET”, error : function() { alert(“failure”); }, success : function(data) { $(‘#cm’).html(data); // to display the sample.html file content. } }); }); }); </script> <body>

101 total views, 1 views today

» Read more

Ajax tutorials with examples

Ajax (Asynchronous javascript and xml) Ajax is used to refresh the partial page instead of refreshing the whole page. Ajax is used to achieve the more interaction. 3 pillers 1. javascript 2. xml 3. xhr object(XmlHttpRequest object) Ajax process: 1. Calling ajax function (its like normal javascript calling) 2. Creating xhr object.(based on the browser types) xhr object is created

86 total views, 1 views today

» Read more