Posts Tagged ‘JavaScript’

How to convert Javascript Arrays to CSV (Comma separated values)

Let's see a small code snippet in Javascript that converts JS arrays in Comma separated values. It is also possible to convert an array to delimited text where one can choose the separator.var fruits = ;var str = fruits.toString();//print str: apple, peaches, oranges, mangoesThe toString() method converts an array into a String and returns the result. The returned string will separate the elements in ...

Deleting Multiple Values From Listbox in JavaScript

Deleting Multiple Values From Listbox in JavaScript
There was a requirement of deleting multiple options from a listbox using JavaScript. User can select multiple items from a Listbox. Once the delete button is pressed, remove all the values that are selected from the combobox.Now the most intuitive solution for this problem would be to iterate through each option from the listbox and ...

STOP SOPA JQuery Plugin

STOP SOPA JQuery Plugin
Right now, Internet is experiencing the biggest protest since its inception. We have seen people protesting against Companies, Government, Dictators etc. Also Internet has become their voices in form of Twitter & Facebook.But today we saw something completely new. Major websites such as Wikipedia and Google are openly demonstrating their protest against new legislation bills ...

Create ZIP Files in JavaScript

Create ZIP Files in JavaScript
Zip is a very useful file type if I must say most used. It is the most used file format for data compression and archiving. There are number utilities available to create/generate Zip file. Also most of the programming languages comes up with API supporting to generate Zip files. I have written a couple of articles ...

Multiple Checkbox Select/Deselect using jQuery – Tutorial with Example

Multiple Checkbox Select/Deselect using jQuery - Tutorial with Example
Almost all the user interfaces that I have created had this functionality of selecting multiple items from a list to process them or delete them. Although its very very easy to implement this functionality in Javascript, using jQuery for this is real fun. I will show you a simple implementation of adding multiple checkbox select and ...

JavaScript Array Remove an Element

JavaScript Array Remove an Element
Following is an example of JavaScript where we will remove elements from an array with Index and Value. There are different methods in JavaScript that we can use to remove elements. We will use splice() method.Remove Array element by Index First we will see an example were we will remove array element by its index. For this we can define a generic function removeByIndex().function removeByIndex(arr, ...

Disable Back Button in Browser using JavaScript

Disable Back Button in Browser using JavaScript
Sometimes we have requirement in developing a website to disable the Back button effect from Browser. This is common in Online Banking Websites and other sites where security is of principal concern. User may hit back and navigate from the page and forget to logout.Hence sometime it is required that we disable the functionality of Back button. But unfortunately this is not an easy ...

Create your own Search Engine(Interface) using Google Custom Search API

Create your own Search Engine(Interface) using Google Custom Search API
Google Custom Search API are wonderful tools to create some awesome search engine like tools. Also if you want to add a search option to your website and customize the look and feel of your search results, Google Custom Search API serve best to you.I have created a Real Time Search engine (I call it real ...

Default Text Label in Textbox using JavaScript/jQuery

Default Text Label in Textbox using JavaScript/jQuery
In one of my previous article about Change Form Textbox Style on Focus, we discussed about Usability and HCI issues. Slight change in web pages/input forms can increase user experience.Nowadays, it has became a common practice to give user labels on fields that they are editing. For example, if you see Google's custom search textbox ...

Mouse Scroll Event Up/Down Example in JavaScript

Mouse Scroll Event Up/Down Example in JavaScript
The other day I was working on an App that required Google Map like functionality where Mouse Scroll event on an object triggered some action in JavaScript.Handling Mouse Wheel in JavaScript is quite simple. Most of the browsers support Mouse Scroll Event in one or other way. Mozilla provides window.addEventListener method that can be used ...
Page 1 of 41234