Tag | jQuery Posts

Today we had a little situation where to get the selected text of Dropdown in Jquery. As far as I know we can get only the value as given below $("#somedrop").val() This gives the selected value. I did a little google and found a helpful text in discussion forums . The answer will be simple. $("#somedrop option:selected").text() Please let me know if you have some other ways also. Thanks, Thani ...
Lets quickly have a look at how you can limit the entry to textbox and display the character input left to be keyed in. First things first, the script. <script type="text/javascript"> $(function() { var limit = 250; $('#dvLimit').text('250 characters left'); $('textarea[id$=txtDemoLimi... { var len = $(this).val().length; if (len > limit) { this.value = this.value.substring(0, limit); } $("#dvLimit").text(limit - len + " characters left"); }); }); </script> The $() ...
Welcome back. This time we will look at creating a simple jquery pager plugin to use with asp.net mvc project. Please note the intent is to learn the basics of jquery plugin development. The control as such is not recommended for use in production environment. I recommend having a look at the jQuery Authoring Guideline at docs.jquery.com/Plugins/Aut... Let's begin our journey into the mystery of jquery plugin. The first step is to create a self executing anonymous function. Anonymous functions ...
Welcome to eBoard Hello and welcome to this series of application development using asp.net mvc, jquery, automapper, ninject. Though the world doesn't need another blog engine, but sometimes reinventing the wheel teaches you many unknown things and it's the learning experinece that counts more than anything else. I have been using asp.net mvc + jquery for about a year now. So, it's time to put down something which will help the beginner with this technologies get a good graps of the fundamentals ...
Let's try a simple in-place edit with jquery. For demonstration purpose I am using the plain old HTML file. However, if you, wish you could apply the same technique to asp.net, asp.net mvc or php or any other web application as well. Here is the html that we will be using for the demo. <body> <div style="line-height:3xm;back... Double Click the below paragraph to edit. </div> </br></br> <div class="edit"> Lorem ipsum dolor sit amet, consectetur ...
This edition of blog tip shows you how to focus a text input on a page to the desired element. Use jsbin.com for executing/troubleshooting or just for learning jquery or any other popular js framework that it supports. I'll show two ways to do this based on the scenarios you encounter. Using jQuery $(selector).focus method when the DOM is ready: // When the HTML DOM is ready $(function() { $("#elementId").focus(); }); The above works in most cases but may be annoying in situations you have a slow ...

I am typically starting this blog with the "Hello World" kind of post.  Just to give an brief summary to the curious out there this blog will be a place where I will be putting down my experience with technologies specifically asp.net mvc, jquery, sql server, sharepoint, tdd, design patterns et el.

Also, I plan to record my learnings with developing an asp.net mvc project.

 

I've almost finished my first Umbraco project, which is probably the most awesome CMS I've ever seen. In case you've been under a rock (which, after having rooted around this thing, I am starting to feel like), Umbraco is a brilliant, ingenious, pure-XML-powered .NET CMS - sorry to say, but much better than DotNetNuke, and fully validates with XHTML 1.1 due to it's XML nature. It supports nested master pages, Intellisense with Visual Studio, custom user controls, XSLT rendering, Web Services and ...
This series of posts discusses the use of an Aspect-oriented programming approach for implementing the validation part of a business domain, using the ValidationAspects aspect library, that sits on top of the PostSharp aspect weaver and allows for placing Design by Contract - style attributes on properties and method arguments, as well as for easy runtime validation of an object's state. This is the third post of a three-part series that discusses the use of these validation aspects throughout the ...
Sometimes you have a t-shirt idea, but there is no way to try it out – until now. Introducing OnAShirt.net. It is a simple app I coded in a couple of hours today that allows the user to place text over a picture of a t-shirt, or even to conduct t-shirt conversations with themself. Thanks to jQuery for making this sort of thing so easy ...
Recently my company just released the first version of a new MVC web site: AlbumCredits.com. This project, led by Oskar Austegard, is was I consider a highly successful real-world implementation of MVC. In a time when most music these days is downloaded, the production and performance engineers, and recording professionals that work on the music don’t always get credit because there is no CD booklet to look through. Album Credits is almost like a LinkedIn for recording professionals. From the about ...
http://dotnetradio.com/arch... Andrew sits down with Atif Aziz. Atif Aziz is a senior IT business analyst at Cargill International and an ex-Microsoftie. His primary focus is helping customers move to the .NET Framework. He speaks regularly at Microsoft conferences and can be reached through his web site. You can find out more about Atif Aziz by visiting his web site www.raboof.com. Raboof.com = FooBar!! Atif describes to us what ELMAH is and the history behind it. He then ...
Going into the whole podcasting adventure was something that I didn’t know if I was ready for or not. I won’t lie, it has taken a LOT more time than I had initially estimated. But getting the opportunity to meet and interact with the people that I have has been wonderful. I thought setting up interviews, given that the site is new, would be difficult. As it turns out getting people to come on the show has worked out quite well. So much so that people are now asking to come on the show directly. Wonderful. ...
A great VIDEO series on all the nice effects (and functionality) you can achieve with jQuery JavaScript library for those who know NOTHING about it. jQuery is a very powerful library. One of the first things I do when creating new project is to include the library in it. Microsoft is going to include it by default in ASP.NET web projects (All ASP.Net projects, not just MVC) starting Visual Studio 2010. Here are some few examples of what you can do with it (VIDEO): http://net.tutsplus.com/art... ...
Hey all. I wanted to let you know that I am going to be interviewing Sara J Chipps (of www.girldeveloper.com) tomorrow at 7am. We will be discussing all sorts of programmer goodness from making your personal projects a reality (such as Sara’s http://bundl.it project), agile development, commenting your code, and your responsibility as a developer to the next person reading your code. We will also be looking at jQuery, asynchronous processes, and architecting for speed and scalability. And of course, ...
This Friday, I’ll may have to stop a project due to limited funding. This web project is for a client who ran into a budget freeze (assumed) and haven’t been able to financially support the project until further notice. But that’s ok, most of the project is completed and they’ll have a very nice website with a web-based intranet all built in ASP.NET MVC 2 Preview 2. So, until funds start flowing, I’ve decided to start a new rebuild of Glacsy.com. Yes, another rebuild. But this time, it’ll be built ...
I was thinking of getting a new football jersey…here are some options. What do you think? Now before you all start making funny comments about how none of these apply to the Falcons (jerks ;) ), how about we focus on the words themselves. Why don’t we see jerseys like these? Don’t we want to show off our teams abilities and talents? Yes and no. When I go to a professional football game, I assume that the players know how to tackle, catch a ball, throw a block, run the ball, etc. I assume the coaches ...
I Just finished reading Learning jQuery 1.3 by Jonathan Chaffer and Karl Swedberg. This book provides a really indepth overview of jQuery along with many real world code samples. Its very well written and talks about all necessary topics from getting you started to Selectors, Events, Effects, DOM Manipulation, AJAX, Table Manipulation, Forms with Function, Shufflers and Rotators, Using Plugins etc. It also talks about advanced topics like extending jQuery and writing your own plugins and contributing ...
I am currently studying some of the listed articles which may be of useful for you guys Study material on Object Persistence (This is in Java but subject is general) New things in .Net 4 Beta 2 Javascript Class browser Making jQuery calls to WCF/ASMX with a ServiceProxy Client Disable button during postback Hope they will be of great use. Thanks, Thanigainathan.S ...
This is part 2 of my series on the jQuery UI Dialog. Part 1 – The Default Dialog covered the most basic usage of the dialog widget. In this second part I will demonstrate a simple modal dialog. A modal dialog is a dialog that takes focus, and disables the rest of the application until it is closed. They are used to force the user to acknowledge something, or to gather some input. It is worth pointing out that modal dialogs can be annoying for users so you should consider carefully if it is absolutely ...
CRineta.org, Iowa .NET and CVIneta.org are hosting the fourth code camp to Iowa on November 7, 2009 at DMACC in West Des Moines. These are always great events, and you can't beat the price: FREE! This event gets bigger and better every time they do it, and this time is no exception. SEVEN concurrent tracks, with FIVE time slots at 75 minutes each. These aren't just Microsoft Lovefests either, you'll also find talks on jQuery, Ruby, WebOS, Lisp, Software Craftsmanship, Load Testing, Mobile Device ...
Today I was trying to call ASP.Net web service from JQuery. I thought it was easy first. But when tried implementing them I felt the difficulty. I don't had this problem while calling Ajax enabled WCF service from JQuery. Hence I did a small Bing and found out some useful tips to share. I referred links below. http://www.mikesdotnetting.... http://www.dotnetcurry.com/... http://encosia.com/2008/03/... ...
[Source: http://geekswithblogs.net/E... We had a fiddly issue with date validation in an ASP.NET MVC page failing for a valid date in Chrome, but passing in Firefox, IE etc. Tracing through our own code and xVal, the issue was narrowed down to the jQuery validation plugin (jquery.validate.js). For simple date validation, the library instantiates a date object from the given text value and lets JavaScript raise errors for invalid dates: date: function(value, element) { return this.optional(element) ...
This series is going to document increasingly complex usages of the jQuery UI Dialog widget. This first part of the series will demonstrate how to display the default dialog. Other series members: jQuery UI Dialog: Part 2 – The Modal Dialog The jQuery UI Dialog is a powerful client-side dialog control. It is bundled as part of the jQuery UI suite and as such it is available on the Google CDN. Some of its more interesting features are: Modal / non-modal dialogs Support for resizing and dragging Support ...
It is quite common to display a loader-image or some kind of progress bar image in a browser when the server is busy serving the request. Before we go deep into page streaming techniques with XMLHTTPRequest call and IFrame, lets look into a simple loader icon implementation – the idea is to display “loading” image until the task completes, display the response in the browser when task ends and hide the loader image. to download the source code please click here Invoke a long task and display loader ...
to download the source code please click here In the earlier post we have discussed little bit about the limited number of worker threads available in the thread pool of ASP.NET and we identified why we should always try to avoid to block those important worker threads. ASP.NET 2.0 introduces Asyn=”true” attribute in the page to handle asynchronous scenarios and under the hood this attribute tells ASP.NET to implement IHttpAsyncHandler in the page. There are more than one ways available in ASP.NET ...
As an ASP.NET developer we frequently deal with long running tasks for example: Making long-lasting webservice calls. Making prolonged calls to database that runs complex queries. Do lengthy file operation Calling remote objects etc. When the server is busy performing the lengthy time consuming task/tasks, the poor user has to wait for the response. The most common technique used to interact with user is to display a loader icon or show some kind of progress bar on the page until the task is complete. ...
So this error stopped my productivity for a good three hours today. Gotta love when that happens. I’m sure there are many different ways to resolve this issue, but I didn’t see anyone with the same problem I was having, so I’m going to go ahead and post my experience and how I fixed it. Background Info: I have a page layout I needed to implement and it uses some rounded corners javascript. My web application uses a masterpage, which I keep in a folder at “~/Resources/MasterPages/”. I’m using themes, ...
Visual Studio 2010 Beta 2 is out and has a slick new UI. Also, this Beta has most of the features that would ship with the final version compared to the earlier Beta. Note that while new features might be added, there are chances that some of the features demonstrated here may also not be a part of the final release. But, for now, lets examine the current Beta 2. The first thing you would notice and probably like, is the UI enhancements. Herebelow, is the launch screen. Also, the start page has been ...
These were some useful links on Microsoft Ajax preview 6 http://weblogs.asp.net/Infi... http://weblogs.asp.net/jimw... http://weblogs.asp.net/Bleroy/ Microsoft Ajax Preview 6 Download Page This post by Scott Guthrie is really amazing http://weblogs.asp.net/scot... This preview is quite inetersting as it supports both two way databinding for clientside Datacontext and JQuery based ...
Imagine some newbie or junior web developer walks up to you and says, “What tools would you suggest I use to become a better web developer?” Assuming they’re already using either Visual Studio or Web Developer Express, what utilities or resources do you find indispensible for working with ASP.NET or just web development in general? Maybe you have a favorite online resource site that you recommend, Stack Overflow for example, or maybe you have a favorite utility like Chris Pederick’s Web Developer ...
I can't believe how long this took to figure out, I think I read every WCF tutorial out there, and now I look at it it's so mind bogglingly simple I don't know what I wasted my time doing! All I wanted was a WCF service that would accept a POST from jQuery with some JSON parameters and return some HTML, but it seems I repeatedly cocked up the JSON string format and the attributes for the contract. Anyway, here's a simple example so you don't have to endure my frustration. I used .NET 4.0 because ...
If you’re a web developer using Microsoft technologies then, unless you’ve been hiding under a rock somewhere, you’ve probably heard of ASP.NET MVC. If you’re not sure what it is, how it works, or why you would want to consider using it, you’ll find three videos on the ASP.NET MVC page that will answer most, if not all, of your questions. Video #1, titled “Why Use ASP.NET MVC?”, is a 3 minute video which provides a high-level overview of ASP.NET MVC for decision-makers. I especially like the motor ...
What is something that is longer than a magazine article and shorter than a book chapter? Give up? It's a Wrox-Blox that Wiley has available online with some going for less than $10.00. Written by the best programmers in the their fields, Wrox Blox are short informational pieces and code that will help get you up-to-speed and keep you up-to-date. Build the knowledge you need quickly on a wide variety of topics. In the DotNetNuke world, there are several of these available for you to review and stay ...
Twitter can be a very useful source for data aggregation on any particular topic. Am building an application that will search twitter using their API and then display the results using jQuery. There are 2 ways of accomplishing something like this. We can either do the processing at the server and then populate the page or talk to Twitters REST based api directly from the client. Methods to retrieve data from the Twitter API require a GET request. Methods that submit, change, or destroy data require ...
Recently I had to code some functionality that required event delegation in JavaScript. After searching I came across this great post by Karl Swedberg about how events can be delegated using jQuery. This can be a very useful approach if you want to add new elements to the DOM and have them react to events without re-binding events handlers or if your page simply has too many elements that need to be wired to an event. The basic concept it simple: Instead of attaching an event to an individual element ...
Yes, I know, the multiple file uploading in ASP.NET issue has been exhaustively covered already elsewhere. There are examples of multiple file uploading using ASP.NET user controls, there are examples using jQuery, there are examples using flash to provide progress feedback, and even examples in Silverlight. However, what I wanted was a simple solution which allows the user to select a variable number of files, didn’t rely on postbacks in order to increase or decrease the number of files selected, ...
Just came across this codeplex project which looks useful: jQuery Library for SharePoint Web Services http://spservices.codeplex.... <quote> Project Description This is a jQuery library which abstracts SharePoint's Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. </quote> ...
The Roanoke Valley SharePoint User Group (RVSPUG) held it's first "event" last Friday (September 25). The group is hopes to grow and increase community awareness by hosting the event during the workday (as opposed to the weeknight monthly meetings). Special thanks to Susan Lennon, SharePoint guru, speaker extraordinaire from Virginia Beach. She delivered two informative presentations back-to-back and answered many questions from a very interactive audience (typical Roanoke!). Susan has posted the ...
Like many ASP.NET developers, I’ve gotten by for years knowing just enough JavaScript to get by. I’ve spent many frustrating hours cursing the language, when the problem was not really JavaScript (although it has more than its share of weirdness), but my assumption that I knew how it worked, just because it looks like C#. Now, thanks in large part to jQuery, I actually enjoy client-side programming. jQuery makes things so much easier (replacing dozens of lines of code that I painstakingly figured ...
The first bug I was asked to fix, here, was a bug in the Q Framework. Our websites use a little pop-up, calendar datepicker (I believe it's the jQuery datepicker, but I'd have to check). The problem we were experiencing is when we added a UK client. As most of you know, the UK displays dates in DD-MM-YYYY format as opposed to the US MM-DD-YYYY format. This trivial detail actually has a wide range of implications. First of all, any US-oriented datepicker is going to have a conniption if you pass it ...
Scenario: Hijack all my save buttons via the script below to override the value, from Save to Saving...., and then also disabling the button so they cannot hit it 1000 times. $(document).ready(function() { form.find(':submit').each(f... { $(this).attr("disabled", "disabled").val("Saving...."); }); }); The Issue: I have several submit type buttons on the page, like Save, Sand and Proceed, Delete, etc, so I use the Request.Form object to see what button was pressed to decide what to do. Well, ...
We’re less than a month away from the Software Development and Evolution conference, and I wanted to send an update on a few things. Student Pricing If you’re a college and university student, we want to make it affordable for you to come out so we’re offering a $75 student rate starting today! Be advised that if you register under the student rate, you must present valid college or university issued identification when you arrive at the event. Visit the event website for more info, or go straight ...
For many customers the ROI on software licences is one of the key factors when purchasing software, so when deploying an e-Commerce solution the level of return for frameworks, and CMS platforms such as Commerce Server and MOSS are quite justifiable, however it is the extra features – such as the Store Locator that is difficult spending licensing money on. The current store locator within CS 2009 is based on a commercial Microsoft Virtual Earth web-service, which is provided for non-developer used ...
Goal: jQuery AutoComplete in ASP.NET MVC Framework with callback to customize result Platform/Environment: Asp.Net Mvc version 1 jQuery 1.3.2 Autocomplete - jQuery plugin 1.0.2 Quick Solution: Here I am simply returning a list of account names: $('#Name').autocomplete( $('#ajaxListMatchingAccount... { delay: 10, minChars: 3, matchSubset: 1, matchContains: 1, cacheLength: 10, autoFill: true, mustMatch: false, selectFirst: true, max: 15 } ); ajaxListMatchingAccountName... - this is a ...
Normal 0 false false false MicrosoftInternetExplorer4 st1\:*{behavior:url(#ieooui) } /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.000... mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} ...
Issue: I have a grid which I have what I can only describe as containing “Core” data and “Minor” data. What I'd like to be able to do is to show the Core data in the main grid view but to allow the user to add/edit/view the Core and Minor data when they open the relevant dialog. In essence this would be like having hidden columns that were viewable/editable when the dialogs were opened with form editing/viewing. The Minor data is only of interest to some users, so I don't want to show it in the main ...
In a previous post, I showed how to submit an AJAX form in MVC with the jQuery Thickbox and the built-in MVC AJAX helpers. If you read that post first, it will show the complete context for how to simply submit an AJAX form that is being rendered inside a jQuery Thickbox with built-in MVC AJAX helpers. But what if you want to stick to a pure jQuery solution? That is also simple enough to do. Instead of using the Ajax.BeginForm() method, you can use the jQuery Form Plugin. The code is almost identical ...
A relatively common scenario you might want in your application is the ability for a user to click a link that pops up a little dialog to submit some information. For example, let’s say you have this form where the user could click the “Contact this person” link: After clicking this link, it pops up the following dialog where the user can type in their message: Finally, once the user submits their message, it shows a little confirmation: This scenario can be implemented with MVC with very few lines ...
Scenario: You have a drop down box or list box in your jQuery jqGrid plugin and you edit the row via the form edit modal dialog but the form fails to show your selected option(s) in the drop down or list box. The reason: The jqGrid SELECT element binds the selected option(s) innerHTML (not the value) with the name value in the colModel. Example: In the JavaScript file I have a function that I call to setup the grid: function jqGridAccountContact(item, listURL, editURL, $rows, hideGrid) { //get all ...