0

Setting the screen position when visiting previous page with jQuery

Posted by Tim on January 18, 2012 in jQuery

The scenario This problem came while I was working on a client’s website. Take this scenario. I have a listing page (similar to a listing page from www.trademe.co.nz or www.ascent.co.nz ). They have a lot of listings. Each listing has a hyperlink going to a detail page which describes more about each listing. If you [...]

Tags: ,

 
0

Perform ASP.NET Postback using JQuery

Posted by Tim on October 27, 2011 in .NET Framework, ASP.NET, jQuery

Came across a situation where I needed to disable the ASP.NET button using JQuery when the user clicks on the button, this is so we stop the user from clicking the button twice while the page is doing a postback. Firstly, add the following JQuery/Javascript code: <script>  function autoSubmit()  {  <%= ClientScript.GetPostBackEventReference(btnSaveChanges, "") %>;  } [...]

Tags: , , , ,

 
0

Max number of words in textarea using jQuery

Posted by Tim on June 7, 2011 in jQuery

Here is a little code snippet to set a maximum of words in a text area element. This could be turned into a jQuery function or refactored to be better reused, but there is a sample just to get you going. $(‘textarea’).keyup(function () {             var wordArray = this.value.split(/[\s\.\?]+/); //Split [...]

Tags:

 
0

JQuery 1.6+ attr and prop issue

Posted by Tim on May 16, 2011 in jQuery

I used the following code to make sure all radio buttons where unchecked and the current one was set correctly. This worked well before jQuery 1.6. $(document).ready(function() { SetUniqueRadioButton = function(current, id) { jQuery("input[type=radio]").each(function() { $(this).attr("checked", false); }); current.checked = true; }; }); Since jQuery 1.6, this code did not work and after doing some [...]

Tags:

Copyright © 2008-2012 Codelab Blog All rights reserved.
Desk Mess Mirrored version 1.9.1 theme from BuyNowShop.com.