" Live as if you were to die tomorrow. Learn as if you were to live forever.. "
- Mahatma Gandhi

Basic HTTP Authentication while making calls to HTTP services in Rhomobile

Posted on November 24th, 2015 by Ashis Kumar

Server APIs which implement basic HTTP Authentication mechanism need username and password to be sent with each API call. This can be achieved in Rhomobile Ajax call as follows $username = “some@example.com” $password = “password” result = Rho::AsyncHttp.get ( :url => “http://www.yourservice.com/API/getRecords”, :authentication => { :type => :basic, :username => $username, :password => $password } […]

Posting Arrays of JSON to Server using Rhomobile AsyncHttp

Posted on November 24th, 2015 by Ashis Kumar

Problem: When using Rhomobile, posting data using AsyncHttp method to server, Rhomobile converts all the data to string while sending them. At times this creates issue during parsing of the data on server side, for which additional code is required to parse the string to object on server side. data = { :searchQuery => “some text” […]

Rendering as JSON for the Ajax call to local methods in Rhomobile

Posted on November 24th, 2015 by Ashis Kumar

Introduction: While developing application, we sometimes need to make ajax calls to local methods so that we can render the update without refresing the whole page. When we do so using RhoMobile and get the data using javascript ajax call, we found that the data is rendered as HTML and the data is wrapped inside […]

Successive AJAX Call on Key Stroke

Posted on November 23rd, 2015 by Swarup Sahu

In my project, I have a search box. Here I need to made a ajax call on key up so that it will return search results for each text. This is because I do not have any search button to made the ajax call. One more thing, I am using Filemaker database and on each […]

Two minutes to learn Ajax File upload

Posted on November 23rd, 2015 by Dinesh Sahoo

If we have read/seen it somewhere that ” File upload using Ajax”, then it is not through AJAX. File uploading is basically done through an iframe in this case. We have to use an iframe to upload the files. Honestly speaking implementing javascript code using an iframe is quiet difficult for a beginner. In that […]

How To Abort A AJAX Call Before Calling The Same Again

Posted on November 23rd, 2015 by MANISH AGARWAL

I want to show auto search result below the search box as the user types in the letters and not wait for a button click (similar to Google Instant search) . So wjhat I need to do is make an AJAX call and get the data from the database as the user is typing. In […]

How To Set Label And Value In jQuery UI Autocomplete

Posted on November 23rd, 2015 by Indrakshi Ghosh

Lets say, we want to show an autocomplete field with different display text and the different raw value using jQuery UI autocomplete. So what will we do. First we have to send our formatted data from the server side coding. Lets take a look to an example: Suppose we want an autocomplete field where we […]

Bootstrap Progress-Bar with jQuery Ajax

Posted on November 23rd, 2015 by Shiv Prasad

Often, we notify user content is download-in-progress by using loading GIFs, which in background are displayed / hidden by using classical callbacks that jQuery ajax exposes namely beforeSend and success, error. One of the disadvantages of using GIF loader is that it cannot indicate by any means, what is the current status of the background […]

Reset or clear the form data when form is submitted by AJAX using jQuery

Posted on November 23rd, 2015 by Subranil Dalal

When a form is submitted through submit button click the form data is subsequently cleared or reset . But when we submit a form by AJAX then we have to clear the form data by picking every element and setting the value as blank. If a form contains more than 100 input fields then it […]

How to check session timeout through AJAX call?

Posted on November 23rd, 2015 by Dipak Panda

Now a day most of the applications are running on AJAX. We are making huge use of AJAX to provide rich internet experience. Think of a situation, where your application is password protected. For each http request we make to server, it is being checked against session existence. If session has been expired then the […]

Ajax Cross Domain Error And Its Solution Using YQL

Posted on November 23rd, 2015 by Sourabha Sahoo

Sometimes we face cross domain error like  XMLHttpRequest cannot load [URL]. Origin [YOUR WEBSITE] is not allowed by Access-Control-Allow-Origin while fetching data from rss feeds directly through the browser. Here the browser security prevents direct fetching of data from other domains unless the domain host includes the Access-Control-Allow-Origin header.So the  basic solution is to use […]

Using PageRequestManager class to disable controls during an unfinished AJAX call

Posted on November 23rd, 2015 by Author: Sumit Singh

Some times there is a need to stop multiple asynchronous(AJAX) requests from a single page. If you are using ASP.net Ajax Extensions as your Ajax Framework, then Sys.WebForms.PageRequestManager is the class, that can help you to catch the InitializeRequest and EndRequest events. Now you can add JavaScript functions to these events for disabling controls, showing progress dialogs etc Here […]

ASP.net project migration issue with ASP.net Ajax. Solution : xhtmlConformance in web.config

Posted on November 23rd, 2015 by Mritunjay Kumar

Some times you may face weird issues in applying of the Asp.net Ajax Controls (like UpdatePanel etc) in case of ASP.net projects, migrated from ASP.net 1.1 to ASP.net 2.0 or 3.5. Issues may be like, Ajax UpdatePanel doing postback synchronously, which is not the expected behavior. Few days back I was stuck with this, and after struggling […]

How to stop ModalPopupExtender flickering on pageload

Posted on November 23rd, 2015 by Madhusmita Rout

If we use the ModalPopupExtender of  Ajax Control Toolkit we may run into flickering issue i.e. the content of ModalPopupExtender shows up for a moment during the page load and then disappears, while it should not be displayed on the page load. To solve this problem we have to set up display property ‘none’ on […]

ASP.NET AJAX SlideShow Extender

Posted on November 23rd, 2015 by Bibhuti Chanda

In ASP.NET AJAX Control toolkit there is an extender known as SlideShowExtender. This can be used to create a Slide show by looping through the images. The images are shown in the SlideShow by using a PageMethod or a Webservice. Example:   <div> /*Add a script manager in your page */ <asp:ScriptManager ID=”ScriptManager1″ runat=”server”> </asp:ScriptManager> […]

Using behaviourId to customize AJAX controls & extenders

Posted on November 23rd, 2015 by Aditya Acharya

Each Ajax control & extender is associated with a Javascript file named asBehaviour.js . This file contains those functions which specify the behaviors of these controls and extenders. If we want to customize any behavior of these controls or extenders we can update the source code. But it is not a good option to modify the […]

AutocompleteExtender in Multiline Textbox with new line as delimiter character

Posted on November 23rd, 2015 by Sumit Singh

In single line Textbox, Ajax Control Toolkit – AutocompleteExtender works fine. Once we use AutocompleteExtender in a Multiline Textbox and think of using new line as delimiter character, then it used to give some issue.  (In MultilineTextbox, suggestions to come ‘one time – in each line’ is a frequently required need.)   The problems are like  – some time suggestions do […]

jQuery and Asynchronous Postback with UpdatePanel Issue

Posted on November 23rd, 2015 by Aditya Acharya

What  If you are using jQuery in your application then you may be familiar withdocument.ready() function of jQuery. This function executes after all the elements are loaded in the page. So it is a better way to bind the events for elements or to write some initialization Javascript which we want to be called on […]

Using jQuery AJAX Calls to send parameters securely

Posted on November 23rd, 2015 by Madhusmita Pradhan

We are always providing all sorts of validations both at client and server side for security purposes. But some times a small mistake at client end during validation can pass wrong data to the server. So, there are some points that we need to keep in mind, when we pass additional parameters to the server […]

Solving back button issue in an Ajaxified page

Posted on November 23rd, 2015 by Manoranjan Mohapatra

THE PROBLEM We all know that when a user navigates through a website, each page s/he visits is logged by the browser in their history. An inherent problem with an Ajaxified application is browser navigation, as AJAX pages don’t postback while making request,they cant remember their previous states. The problem that arises here is that […]

How to validate reCAPTCHA through AJAX in ASP.NET?

Posted on November 23rd, 2015 by Devi Das

If you want to know what is reCAPTCHA and how to use it in your ASP.NET Web application then please refer to the Tip “How to use reCAPTCHA in your site?” In the above Tip i am validating the captcha on postback. But this tip will show you how to validate the captcha by AJAX […]

A secure way of sending information to a web service.

Posted on November 23rd, 2015 by Aditya Acharya

Using AJAX and web services in your application can make it richer. But passing information from the client end through Ajax is always a headache as the information can be hacked. That means the end user can change the post parameter values and can explore information that you want to hide from them (Only if […]

Call Web Service from JavaScript using jQuery

Posted on November 23rd, 2015 by Narendra Mallik

Suppose we have the following code behind function which is defined in PrintReport.aspx.cs file. [WebMethod] public static string HelloWorld(string name, string crmId, string comment, string phenotype) { return “Hello World”; } Now if we want to do ajax call to this function using jquery we will right something like below in our script file. // […]

Retrieval Of The Record Into An Array Using AJAX

Posted on November 23rd, 2015 by Sisir Patro

This tip is deal with the retrieval of the data from the database by using the AJAX in a web method in an array. Generally while retrieving the data from the database through the SQL query most of the times the database operations are time taken so the loading of the data takes slower. To […]