Makitweb Posts

JavaScript has some inbuilt method which easily converts an Array to string.

You traverse on the Array and concat value to a variable with a separator for string conversion if you are not familiar with methods.

Converting an Array to string in JavaScript


Nowadays all modern browsers allow copying content to the clipboard with JavaScript.

But before this, it is not supported in most browsers because of security reasons. You need to ask the user to press CTRL+C to copy the currently selected text.

The ZeroClipboard library uses invisible Adobe Flash movie for copying content to Clipboard. It works well with most browsers.

In this tutorial, I show How you can copy content to the clipboard with or without Flash.

How to copying content to the Clipboard with JavaScript

How To Javascript

It is better to restrict the user from entering invalid input and submit the form.

If the inputted data is invalid then the request is not been executed on the server-side script if added validation and the user needs to again fill the details.

If a field does not require a specific type value like – number, character, special character then stop the user from entering.

In this tutorial, I show how you can restrict keyboard character input with jQuery and JavaScript.

Restrict keyboard character input with jQuery

Javascript JQuery

Pagination is a technique to break and display the large list of content in the smaller parts. This reduces your page load time and it is user-friendly.

There are multiple types of pagination available some are –

In this tutorial, I show How you can add numeric pagination to your web page.

How to make PHP numeric pagination

DataBase PHP

When an AJAX request is sent to fetch records from the server then it may take times depending on the data processing or the number of records.

If the AJAX request takes more time then at the Client side there is no visible change is been displayed and the user doesn’t know whether its request is in progress or not.

You can display a loading image or text message on the page when AJAX request is in progress and hide it after getting a response.

In the demonstration, I am displaying a loading image when sending an AJAX request.

Display loading image when AJAX call is in progress


With jQuery UI it is easier to add Datepicker on the textbox element or in any other HTML elements.

If you like to restrict access of users to select a date within a range then there is minDate and maxDate options are available in jQuery UI.

Using this you can set the date range of the Datepicker.

After defining this options the other days will be disabled which are not in defined range.

In this tutorial, I show you how to use both options in jQuery UI Datepicker to restrict date range.

How to Set Minimum and Maximum Date in jQuery UI Datepicker


You have seen on many Mobile apps when you pull down from the top and release it the content is been refreshed.

The common example of this you see in Chrome, Opera mini browser for mobile.

In this tutorial, I show How you can add the similar type of functionality to your web page in desktop view.

What in the demonstration?

I will create two examples,

  • Reload page when the user pulls down the button at the specified height.
  • Reload page when the user releases the button.

How to make Pull down to refresh webpage with jQuery

How To JQuery

jQuery not only allow us to attach Event Handlers on the element it also allows to take control the flow of the events.

You can enable and disable an event whenever you want in your program.

When it’s required?

  • The event is no longer needed on the element.
  • Enable event when the specific condition is TRUE otherwise disables it. The most common example, of this you see on Registration page of many websites where they don’t enable click event until the user is not checked I agree on terms & conditions.

jQuery has on() and off() method that helps you to enable and disable your specific selector.

Enable and Disable Event from element with jQuery