Cross Domain AJAX Request

In my earlier blogs, I have explored ASP.Net and JQuery topics. You may also read – How to Call ASP.Net web method using JQuery AjaxIn this blog let’s see about Cross Domain AJAX Request.Sometimes you have noticed that the browser refuses access to remote resources which you have requested. Do you know the reason behind … Read more

Error – Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response.

I was working on a project where I wrote a web method and called this web method from JQuery.While accessing the web method I got this error –“Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response.”In debugging, I couldn’t find any issue with the code neither in C# nor in JQuery.Then I … Read more

What is JQuery Callback Function?

A call back function executed after the current event has completed. Java Script code executes line by line. However, if next line of code executes even before completing the action(s) which wrote in previous lines. This may create an error. To avoid this, we can create Callback function. JQuery Callback Function Syntax Syntax: $(selector).hide(speed,callback); To … Read more

JQuery Events Methods

Like a programming language, a JQuery also has some events. JQuery event occurs on a web page when a user takes some actions like the mouse click, mouse scroll, check box selection etc. Below are some events. Mouse Events Keyboard Events Window Events Form Events Click Key press Load Submit Double Click Key down Scroll … Read more

JQuery Selectors

JQuery selectors allow you to select and manipulate HTML elements. JQuery selectors find HTML elements based on id, name, attribute, classes etc. General syntax for JQuery selector is $()Ex: Element selector$(“p”) – select all p element on that page. ID selector $(“#txtUserName”) – select control with mention id. Class selector $(“.myclass”) – select control, html element which … Read more

JQuery Tutorial

What is JQuery? · Jquery is a light weight java script library.· JQuery is cross browser.· Easy to write compare to java script. $(document).ready is a jquery event. It fires as soon as the DOM is loaded.This event is fired before all the images, css are fully loaded. $(window).load event fires when DOM and all … Read more

HTML Form Validations

In this blog, we will see HTML form validation code in JavaScript. My another blog on AMP HTML and Angular JS.Form validation for Alphabet only: Sometimes you may require allowing the only alphabet in a particular input field. For Eg first name and last name, a field should not allow any other character apart from … Read more