How to perform operations on select box using jQuery / Drop down jQuery cheat sheet

There are many operations which we have to perform on select boxes (or drop downs) such as selecting an option based on index, selecting an option based on visible text, removing an option etc. using jQuery.

Most of the times, we do not remember the selectors or methods to accomplish the required task and we end up searching the Internet giving away our valuable time. In this post, I have tried to accumulate various operations and their methods which should be helpful to many. Read On !!! (more…)

Continue Reading

How to convert a string to boolean in javascript / Various ways to convert a string to boolean in javascript

There are situations in which we have a boolean value in string format (‘true’ or ‘false’) and we want its boolean equivalent (such as true or false).
Practical application is when we have a check condition value which is stored as a string in database and based on this value we want to perform some operation on our html page (or jsp).
Off course, we can compare the string returned from database with ‘true’ and ‘false’ and get a boolean as a result but this may not be a perfect solution.
Below, I have tried to collect some approaches to achieve this. Read On !!! (more…)

Continue Reading
Close Menu