JSONP is JQuery(JavaScript) method used to request data from a server in a different domain, something prohibited by typical web browsers because of the same-origin policy. JSONP takes advantage of the fact that browsers do not enforce the same-origin policy on<script> tags. JSONP is a viable solution for cross-domain Ajax. JSONP does not work with …
Tag: javascript
Permanent link to this article: https://blog.openshell.in/2014/06/how-to-use-jsonp-method-in-jquery/
Jan 22
Use Number() instead of parseInt() in javascript
Recently I came across the issue in converting string to integer in Javascript(JS). I was used parseInt() method to convert string value into integer value. unfortunately, I was faced issue in chrome browser but all other browsers like firefox, ie and safari are worked fine. Its too hard time for me to find out the …
Permanent link to this article: https://blog.openshell.in/2014/01/use-number-instead-of-parseint-in-javascript/
Dec 13
Dynamically create form in javascript on fly
To create a form dynamically using JavaScript on fly of the webpage. This which helps to create form and input controls dynamically. [javascript] /* To create form with javascript */ var form = document.createElement("form"); form.setAttribute(‘method’,"post"); // form method form.setAttribute(‘action’,"test.php"); // form action url form.setAttribute(‘name’,"frmName"); // form name form.setAttribute(‘id’,"frmId"); // form ID form.setAttribute(‘target’,"_blank"); // form target …
Permanent link to this article: https://blog.openshell.in/2013/12/dynamically-create-form-in-javascript-on-fly/
Permanent link to this article: https://blog.openshell.in/2011/03/list-changer/
Dec 17
How to avoid Conflict in jQuery
Many JavaScript libraries use $ as a function or variable name, just as jQuery does. In jQuery’s case, $ is just an alias for jQuery, so all functionality is available without using $. If we need to use another JavaScript library alongside jQuery, we can return control of $ back to the other library with …
Permanent link to this article: https://blog.openshell.in/2010/12/how-to-avoid-conflict-in-jquery/
Dec 06
Tips for using jQuery
Find if something is hidden: We use .hide(), .show() methods in jquery to change the visibility of an element. Use following code to check the whether an element is visible or not. if($(element).is(“:visible”) == “true”) { //The element is Visible } Center an element on the Screen: To make align the element to center. jQuery.fn.center …
Permanent link to this article: https://blog.openshell.in/2010/12/tips-for-using-jquery/
Permanent link to this article: https://blog.openshell.in/2010/12/slideshow-using-jquery/