Posts in Javascript Categories

jQuery News Ticker

I wanted a typewriter style news ticker that would display news items one character at a time. I had a look round and there are a few jQuery news tickers available but I just wanted something very simple that worked with jQuery 1.3.2. I couldn't find a plugin that exactly fitted my requirements so I decided to make my own.

Run Microsoft Ajax Minifier from the Visual Studio Tools Menu

Microsoft has created a great tool, Ajax Minifier a free tool that you can use to minify your JavaScript and Cascading Style Sheet files. So far I have had no problems with the minified JavaScript.

How to debug Javascript, JSON and ASP.NET WebServices with Firebug

Writing a JavaScript client-side interface backed by ASP.NET Web Services is a great way to create a rich responsive interface. A previous post on Client Side Binding Using Ajax Page Methods and jQuery demonstrates some of the first steps to do this. It can be a bit tricky when it's not working figuring out what is wrong. Is it the JavaScript the Web Service or something else.

Using Google Analytics Event Tracking

One of the first things a new website owner wants to know is how people are visiting my site. Any statistics package can give you this information but my current favourite would be Google Analytics, it free, flexible and easy to use. Page views and bounce rates are not always a good measure of success. Plenty of people may visit the site but how many take action and contact you or signup for the service you provide. This is where event tracking a little known feature of Google Analytics comes in it you to track actions your visitors take on your site and manipulate the results.

Blogger, Html scraping, JQuery and YQL

For a recent project I was working on I wanted to display some sports results on my local football club's website. The association publishes the results weekly on its website, we also wanted to post them on our website. It would be a waste of time to type them out each week so what can we do? First solution I thought of was HTML data scrapping the results and redisplaying them, better than using an iframe as the results were not in a format that would suit our site. It would be fairly straight forward using ASP.NET on the server but this website is a Blogger site with limited server side functionality.

Getting the selected value of RadioButtonList with JQuery

It struck me the other day that it is so easy to use AJAX with ASP.NET it can make you lazy. I was working on a project where I had some radio boxes and based in the selection of the radio boxes another fields was displayed or hidden. I didn't want the page to post back so initially it though I'll just pop it in a AJAX UpdatePanel and write some code to show or hide the fields after the selection is made on the RadioButtonList.

SWFObject.Net 1.1 released

SWFObject.NET 1.1 has been released. SWFObject.NET is a C# ASP.NET server control that wraps the functionality of the SWFObject 2.2 JavaScript library. SWFObject works great to avoid the ‘click to activate’ problems that affected IE6, IE7 and Opera 9+.

Improve ASP.NET Web Application User Interface with Keyboard Shortcuts

Implementing keyboard shortcuts can greatly improve the user interface of your web application. Interface navigation is a good place to start, for example if you are viewing a slide show of photos you may expect to be able to navigate through the photos using the left and right arrow keys on you keyboard. For an application that has a popup dialog very common functionality is the ablity to push the escape key to cancel the dialog and close it.

Handling Tabs in Textareas across browsers

Sooner or later when you are developing a web based application you will want to enable tabs in textareas so you can format some HTML or CSS. My first thought is why is this not a function of the web browser it would make sense to have a property you could set to enable tabbing. But no you need to use JavaScript. You can find plenty of solutions searching on Google. Most solutions, like the first one I found , detect when you press the tab key cancel the event and insert a tab into the textarea instead. This method is simplistic and limited when you are used to a IDE and want to indent blocks of text.

Toggle multiple checkboxs using JQuery with ASP.NET

In one of my projects I had a button to toggle a collection of check boxes output from a CheckBoxList control on the page. Initially I toggled these with a server postback.