jQuery

  • Hertz and Aerlingus team up for new project HertzFlyDrive.com, designed and developed by Dragnet Systems

    HertzFlyDrive.com - A new car rental site from Hertz and Aerlingus, designed and developed by Dragnet Systems

    After many months of work I'm proud to announce my latest project HertzFlyDrive.com. This website was designed from the ground up provide Hertz with a more effective way to manage their car rental booking information and help speed up the booking process for end users.

  • Hide a submit button when clicked and show loading message using jQuery and asp.net

    This is a nice feature to add to your forms. One of the main reasons you might want to hide a submit button and display a message to the user is to stop them from clicking the button again which, depending on your code, could duplicate a request on the server. This isn't something you want to happen - especially if you're taking payments!

  • Uncheck all checkboxes when a page loads using jquery

    I am working on a project at the moment that requires checkboxes to do animations using jquery. It's all working fine unless I return to the page using the back button. As a work around I decided it would be best to just clear out any checkbox that were already selected. It's not ideal, but it saves me having to fire off an animation on page load which looks very slow as everything else on the page is loading in.

    To uncheck all of the checkboxes on your page using jquery all you need to do is use this code:

    $().ready(function() {
        //on page load uncheck any ticked checkboxes
        $("input:checkbox:checked").attr("checked", "");
    });
    

  • Use JQuery to add a simple watermark to your asp.net textbox

    The script below will let you use jQuery to place a simple watermark in your .net textbox. A good example would be a search box on your site where you want the word "search" in your textbox. When the user clicks into the textbox the word "search" will disappear.

    To get this up and running you just need to make sure you have jQuery (obviously) and then you add the following javascript within your <head> tag:

    
    

      The function should be easy to follow. Basically we are just checking the value of the textbox that has the class searchField on our page. If that textbox contains the word Search we are going to remove the word when the user is inside that textbox. The last part of the function is a check to ensure we don't wipe out the search term if the textbox contains a value that was entered by the user.

    So now that we have our javascript we just need to make our .net textbox. You will have seen in the above code that I am looking for a class called searchField so I just need to ensure my textbox control has this css class on it.

      <asp:TextBox ID="searchField" runat="server" CssClass="searchField" Text="Search" />

    And that's all there is to it!

Updates

Follow me online at TwitterFacebook or Flickr. If you want to get in touch with me try emailing me.

Latest Tweets