Cascading Style Sheets, AJAX, and Hacks

As of writing this I am working feverishly on developing an easy-to-use interface for adding new notes to Jiive using a combination of sophisticated CSS, the ASP.NET AJAX Control Toolkit, and some custom validation/postback mechanisms developed to assist with this AJAX interface.

I’ve recently come across some interesting links regarding CSS Filters, CSS Browser Compatibility, and some AJAX stumbling blocks.

The first and most annoying bit of AJAX trouble I came across with this ASP.NET AJAX Toolkit was the apparently infamous ‘Sys is undefined’ JavaScript error that fellow developers receive when they attempt to load their page after making the initial inclusion of an AJAX control. I came across some sites that helped clarify the issue and among their suggestions one of them was to make certian to register the script module among the HTTP handlers. Here is a portion of the sample code from the web.config included with the ASP.NET AJAX sample website:

<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>

Adding this appeared to resolve the issue.

As for CSS, I found some good links for using CSS filters (like shadow and glow), since I am interested in designing my header using CSS rather than photoshop. I used to know these by heart but it’s been so long that I had to look them up.

MSDN’s Article on Using CSS Filters and Transitions

Web Shoppe – CSS Filters

Enjoy the links.

[Post to Twitter] 

If you enjoyed this post, make sure you subscribe to my RSS feed!

Comments 1

  1. vjeran wrote:

    well.. i was also workign with ajax on one website adriaticvilla.com. Well it is cool but u had to watch. My designer gave me nontableless html and i couldn’t shift back – anyway.. it looks that some controls have problems in ajax with tables – like accordion. I resolved this by making div tables.
    Another issue where validators but this is repaired.
    Still, there are some things that would be nice to work different way. Like, update panel needs to have trigger button in itself. When u look at digg.com and email button (you must be loged)- you will see how does it looks from outside – much better! This is one of things why i like jquerry.
    Most of other things are very good and usefull. Mixing some other stuff can still cause problems, but this are other issues (i tried to move viewstate to bottom of the page).

    Posted 13 Aug 2007 at 5:14 pm

Trackbacks & Pingbacks 1

  1. From 20 AJAX and CSS Tips on 05 Sep 2007 at 12:29 am

    [...] have done previous posts before on AJAX and CSS, but this time I’m going to simply give you a list of links I’m using for a little AJAX [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *