Javascript Archive

How To Convert JSON Data Into Html Table Using Javascript jQuery

In this tutorial i am going to explain about how to display the json data into html table using javascript & jquery. For explaining how we convert the json data into html table using javascript & jquery we have created a json file that contains the below json data. data.json: [crayon-5a3408b862360187451431/] To explain the process

ASP.Net – Validate form using css in C#.Net

Output: Html Code: <!DOCTYPE html PUBLIC“-//W3C//DTD XHTML 1.0 Transitional//EN”“”> <html xmlns=””> <head id=”Head1″runat=”server”>     <script src=””type=”text/javascript”></script>     <title>Show error message using css</title> </head> <body>     <form id=”form1″ runat=”server”>     <div class=”field-box control-group”>         <label class=”span4″>             Note:</label>         <textarea name=”Text1″ class=”span3″ cols=”40″ rows=”5″ id=”txt_Note” runat=”server”></textarea>         <span style=”color:red;display: none;”>Please enter the note..</span>     </div>    

Show hide password characters using javascript,jquery

<!DOCTYPE html> <html> <head runat=”server”> <title>Show Hide Password</title> <%–Include jQuery Library–%> <script type=”text/javascript”src=””></script> </head> <body> <form> <div style=”margin:80px;”> <input type=”hidden”value=”0″id=”mode”/> <input type=”password”id=”txtpass”/> <button id=”btnclick”onclick=”return fnClick();”>     Show Password </button> </div> </form> <script type=”text/javascript”> //Javascript code to show hide password characters functionfnClick() { varcurval = $(‘#mode’).val(); $(‘input[type=”password”],input[type=”input”]’).each(function () { if(curval == ‘0’) { $(this).replaceWith(‘<input type=”input” id=”txtpass”

What is mean by $.fn.

In jQuery, what does $.fn. mean? I looked this up on google and found the below answer. It allows you to extend jQuery with your own functions. For example, $.fn.something = function{} will allow you to use $(“#element”).something(). $.fn is also synonymous with jQuery.fn which might make your Google searches easier.

How to check if element is visible in Zepto

function isVis(ele) {     if(ele.css(‘display’)!=’hidden’ && ele.css(‘visibility’)!=’hidden’ && ele.height()>0) {         return(true);     } else {         return(false);     } }

Iterate through nested JSON Data using javascript

Below is the code used: <!DOCTYPE html> <html> <head>     <script src=””></script>     <meta charset=”utf-8″/>     <title>JS Bin</title> </head> <body>     <div id=”output”>     </div>     <script>         (function () {             var myobj = {                 obj1: { key1: ‘val1’, key2: ‘val2’ },                 obj2: { key1: ‘2val1’,                     key2: { nest1: ‘val1’, nest2:

Iterate through json array using javascript

Javascript Array: var myArray = {“artists”:[{             “a1”:“Adam Sandler”,             “a2”:“Adam Lambert”,             “a3”:“Avril Levine”,             “a4”:“Backstreet Boys”,             “a5”:“Blackstreet”,             “a6”:“Black Eye Peas”,             “a7”:“Cool and the Gang”,             “a8”:“Chicago”,             “a9”:“Charlie Manson”         }],         “songs”:[{             “s1”:“Grow Old With You”,             “s2”:“Whatdaya Want From Me”,             “s3”:“Yea yea”,             “s4”:“Quit Playing Games

Check a checkbox using jQuery or JavaScript?

To check this you can Use the new .prop() function: $(‘.chkTest’).prop(‘checked’, true); $(‘.chkTest’).prop(‘checked’, false); But it will work only injQuery 1.6 and above.  To check in jQuery 1.5 and below versions you need to use .attr(). To check the checkbox (by setting the value of the checked attribute) do $(‘.chkTest’).attr(‘checked’,’checked’); and for un-checking (by removing

Javascript function to validate html select or drop down list

Introduction: In my previous article I have explained about Code used to How to show confirmation message while deleting grid view row. In this article I am going to explain about how validate drop down list or html select using Javascript.   Explanation: For the explanation purpose I have a select list which contains city

Javascript code/function to validate email id | Check Emailid is Valid

Introduction: In my previous article I have explained about How to Valiate radio button using javascript. In this article I am going to explain about code used to validate emailed using  Javascript. Explanation: For explanation purpose  I have a text input and a button in the form. If you enter the emailid and click the

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!