If you need to use the button to remove it self, you can use the following code. Continue reading “Code snippet: Remove button element on the click event of itself using JavaScript”
Category: Java Script and jQuery
Client side validation on asp.net File upload control using JavaScript : For the file type
The following article shows that how to validate the type of the file that is selected to upload by the user. Continue reading “Client side validation on asp.net File upload control using JavaScript : For the file type”
Code snippet: Bind the select elements for the month numbers and years in JavaScript
In the following code snippets you’ll see that how to bind the month numbers 1 to 12 and year range into the select elements at run time using JavaScript. Continue reading “Code snippet: Bind the select elements for the month numbers and years in JavaScript”
How to create and read cookies in JavaScript
The cookies are the small bit of the text data that can be stored in the user’s browser so that it can be reuse in the next request. Generally web server instruct to write the cookie on the user’ browser. But you can also manipulate the cookies using JavaScript. You can create, delete, modify and read using the Document.cookie property. Continue reading “How to create and read cookies in JavaScript”
How to prevent your javaScript code from syntax errors
The Syntax error in the JavaScript code is very common error type when your write the code. Generally when you write the wrong structure of the JavaScript code , browser will give the syntax error at the time of interpretation. Small syntax error in the JavaScript code on a Web page can stop the script from working correctly. Continue reading “How to prevent your javaScript code from syntax errors”
List of jQuery UI widgets and their version added
Some time we try to use the jQuery UI widget with the lower version of jQuery UI supported. At that time it gives an error like as: Object [object Object] has no method ‘[somthing]’.
So you can check the added version of the used widget or jQuery UI control from the following list. Continue reading “List of jQuery UI widgets and their version added”
Example: test() and exec() methods of the RegExp in JavaScipt
We know that regular expression is just string pattern or simple string that describes the sequence of characters for searching something in the specified string. The test() method of any regular expression object returns the Boolean value that indicates whether or not the searched pattern exists in specified string. Continue reading “Example: test() and exec() methods of the RegExp in JavaScipt”
How to know whether string contains special characters or not in JavaScript
In this section I will show you that how we can use the simple regular expression to know whether the specified string contains the special characters or not. Continue reading “How to know whether string contains special characters or not in JavaScript”
Code snippet: Create a new row in the HTML table using jQuery
You can create a new row in the existing html table at run time using the jQuery. The following code sample shows how to create a new row in to the html table. Continue reading “Code snippet: Create a new row in the HTML table using jQuery”
Code snippet: Create JSON string from the web grid in MVC 4
The following JavaScript function returns the JSON string from the data of all displayed rows in the Web Grid control in the MVC framework.
You need to replace web grid id from the #employeeGrid in the third line of the function. Continue reading “Code snippet: Create JSON string from the web grid in MVC 4”