Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Pass Element ID that Triggers `onclick` Event to the Event Handling Function

When we apply onclick event to an element, sometimes we need to pass ID of that element to the event handling function. We can do this by passing id to function as this.id or we can pass the element itself. Example: In the below example I&...

How to apply autocomplete feature to textbox with jQuery?

Sometimes we need to implement autocomplete feature to input field for searching purpose. We can do this by using "autocomplete()" with jQuery. Example: In the below example I have created an array of country names and passed that as source to...

How to implement validation for empty input field with jQuery?

Whenever we create a form, we always have a requirement to put validation for empty fields on some input fields. We usually implement this functionality by putting checks on "blur" and onFocus events of the input field. Example: In the below e...

How to implemente confirm password functionality with jQuery?

At the time of registration or change password we need to provide password, so for this we usually implement Confirm password functionality. Example: In the below example I want to confirm password on form submit, so for this I have created a ...

How to select option of drop down with Jquery?

Sometimes we need select option of a drop-down dynamically by clicking on a button or on some other action. We can do this by using "selected" property. Example- In the below example I have a drop-down for distance and I want to select option ...

How to show div after some time period with jQuery?

Sometimes we need to display some alert or dive after some period on Web page. We can do this by using setTimeout method as below: <html> <head> <title>Demo to show div</title> <script type="...

How to hide a message after some time interval with jQuery?

Whenever we submit a form or do some task, we usually display a success message, but sometimes it is required to hide this message automatically after some time period. We can do this by two ways: By using setTimeout method: ...

how to identify location is enable or not on browser with jQuery?

To get the user's current location use the getCurrentPosition() method. This method contains two parameters, first parameter is success for providing locationd and second one is error to handle errors for ex: getCurrentPosition(success,error) ...

How to get browser current timezone with jQuery?

Sometimes we need to identify the clients timezone to make some calculation on time. For example - we want to save current time based on user's timezone into database, so in this case we need to get the user's current timezone. To do this down...

How to detect if enter key is pressed with jQuery or not?

Sometimes we need to detect where ENTER key is pressed or not to do some action. The "enter" key is represent by code 13 (ASCII value). To detect whether ENTER key is pressed on Web-page or inside an input field, we can bind keypress() eve...

How to iterate Object List in JavaScript

Sometimes we need to send data from Controller to JSp. Here I'm going to explain how we can send and iterate Object List in JSP file. You can do this easily by following the below steps: 1- Define the below dependency in you pom.xml file for...

How to display location on Google Map in JSP in JAVA?

Sometimes we need to display Google Map on a JSP page, for this you just need pass lat/long to JSP. Use below code to initialize map in script: var marker = null; var map = null; var markers = []; function initial...
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: