s (54 sloc) 2.4 KB

ajrawson.com by ajrawson


Writing code and having fun doing it!

Project maintained by ajrawson Hosted on GitHub Pages — Theme by mattgraham

Display jQuery Ajax Error Information


Was helping someone with an ajax issue the other day and to help diagnose what the error was I wrote a little jQuery code to display error information at the bottom of the page. I’m sure there are about a thousand other plugins and posts out there for displaying error information about ajax requests, but thought I’d share mine anyways in hopes that it would help someone out.

<script type="text/javascript">
    $('body').ajaxError(function (e, jqxhr, settings, exception) {
        $(this).append('<div ID="ajaxLog" style="background-color:Red;"></div>')
        var log = $('div#ajaxLog');
        $(log).append('Response Text: ' + jqxhr.responseText + '<br />');
        $(log).append('Status: ' + jqxhr.status + '<br />');
        $(log).append('Status Text: ' + jqxhr.statusText + '<br /><hr>');
        $(log).append('Data: ' + settings.data + '<br />');
        $(log).append('Data Types: ' + settings.dataTypes + '<br />');
        $(log).append('Type: ' + settings.type + '<br />');
        $(log).append('Url: ' + settings.url + '<br /><hr>');
        $(log).append('Exception: ' + exception + '<br />');

You’ll end up with something looking like this:

Error Display Image

Hopefully this helps you out if our run into some issues with your ajax requests.

Tags: jQuery and Javascript

jQuery Ajax Presentation @CVINETA


I recently had the opportunity to give a presentation on performing ajax requests with jQuery at the CVINETA user group in Cedar Falls, IA. I thought the presentation went fairly well, lots of small improvements I can make to it, but over all it went well. My biggest area I need to improve on is taking less time on the slides and spend more time on the demo part of the presentation.

If you are interested in viewing my slides and demo application you can get the files here.

My demo spent time covering the get, getJSON, post, and ajax methods in jQuery and how you can use those methods with an ASP.Net MVC application. I also took some time and covered how you can use jQuery templates to display data on a web page from an ajax request.

If you made it to my presentation, thank you for coming out and if anyone has any suggestions for areas I missed or needed to cover more please let me know.

Tags: jQuery, Javascript, and Presentation

Failure is a Chance for Success


I’m a religious person and came across this passage in my daily readings and felt I should share it. It pertains to all things in life, but I can see its value and power when looking at it from a technical and entrepreneurial point of view.

“Do not let your failures define you. They are not how God measures you. In fact, they are how the enemy wants to measure you; that’s why he asks to sift you. Don’t trust his measurement. Trust Jesus. He has prayed for you.”

In closing, listen to those who support you, those who lift you up from failures and dust you off. They are the ones who will support you and count your successes. Don’t spend time listening to those who count your failures, they are only trying to hold you down and prevent you from believing in yourself.

So if you’ve fallen, dust yourself off, get up, and do something to make the world a better place.

Tags: Personal

Wedding Time


This is a personal blog post, and just wanted to share with everyone that I got married a few weeks ago to my best friend, Lauren. It was an awesome day, a little hot, wedding was amazing and filled with so many close friends and relatives. My wife Lauren and I couldn’t have asked for a better day, well less heat. Thanks to everyone who attended the wedding and a very big special thanks to all those that helped make our day so special. We both thought it was really cool how our entire wedding was filled with friends and family, even down to the musicians, photographer, and deacon. It just made the whole experience even more special knowing that we were totally surrounded by love and friendship.

I want to give some props to our guitar player / singer Andy Juhl, I went to high school with this guy and was so blessed to have him be able to play for our wedding. If you’ve never heard his music before its amazing, you should go check it out at www.andyjuhl.com.

Another person / group that did an amazing job was our photographer, Danny Vasquez. Danny, his wife Jessie, and assistant Jennifer did an amazing job and were there almost the whole day taking some amazing shots and dealing with the intense heat. Thanks can not be said enough for how they handled the heat and made our shots look so awesome! The temps were reaching over 100 degrees on the wedding day.

Below is a video montage Danny put together with some of the photo’s he took on Lauren and I’s wedding day.

Thanks to everyone else who helped make our wedding so special, we can’t say thanks enough for all you did. Love you all!

Aaron & Lauren

Tags: Personal

Working with IIS 7 Remotely After a Server Restart


Since this has bit me in the butt a couple times, I wanted to post a little reminder on a configuration you shouldn’t forget about when setting up your IIS to be managed remotely.

If your working with IIS7 and you’ve configured IIS on your webserver to use Management Service don’t forget to go into the Services section of your admin tools and set the Web Management Service to start Automatically. The Web Management Service is defaulted to start Manual, which is fine unless you ever restart your web server. Since the service is set to Manual the Web Manangment Service won’t auto start after a restart and you’ll have to log into your web server and start yout Management Service manuallly, which is a pain. To save yourself a step and frustration of not being able to work with IIS remotely after a restart, I’d recommend making the setting change so you never have to worry about not being able to connect again.

If you’ve never heard of Management Service, it basically allows you to remotely manage an IIS instance on one machine from another. Which can be very handy and save you some time during the day.

Tags: IIS