Posts Tagged ‘jQuery’

How to select the first element of a dropdown using jQuery?

Written by rsolberg. Posted in All, Software Development

Let’s suppose that you are trying to identify what the first element or value us within a dropdown menu or specifically a select list. Suppose that your select list looks like this… If you wanted to figure out what the very first element of the drop down was, you could use this line of jQuery to get it. Suppose that you wanted to update all the selects or dropdown menus on your page to the first item in the list… You could do that by executing this line of jQuery.    

Data Localization With JavaScript

Written by rsolberg. Posted in Software Development, Technology

I worked on an ASP.NET app with localization and globalization. I was having some difficulty understanding how to get the Date() function in javascript to work properly given the user’s environment. My user base was split between Mexico (spanish) and the US (english). Since the Mexico date format is dd/mm/yyyy and the english format is mm/dd/yyyy, the standard Date(strDate) javascript constructor does not work for me. Then i found Datejs… What a savior! I started off by reading their blog post titled “Getting Started With Datejs“…. Hopefully you’ll find the tool as useful as I did.

ASP.Net GridView Context Menu

Written by rsolberg. Posted in All, Technology

This post will cover how to add a context menu to a GridView in ASP.Net utilizing jQuery. Once your site is setup to utilize jQuery, you can simply include a new style sheet and script file and get awesome functionality fairly easy! Take a look at this site here to download the required files and their code samples. Mine below shows how I used this on a GridView in ASP.NET…

GridView

Menu

jQuery Initialization

© Copyright RSolberg, 2003 - 2014. All Rights Reserved