Kurt,
That is a great strategy and it should work in most cases.

Here is my thinking of what a typical plan would be:
1. Load a page that works assuming Ajax is not available
2. Use the ready() function to hide the content that should be made fancier
3. Make an Ajax call to pull in the fancier code.

Problem is, some Netscape browsers get past step 2, but either fail or
crash on step 3, potentially leaving a missing section of the page or
an angry user that has to restart their browser, only to encounter the
same problem the next time around. The AjaxStart method executes, but
the actual Ajax call ends up failing. That is why I think I need some
browser detection so that the jQuery code is not there at all in these
unsupported browsers.

FYI, the specific code I am working on is just a double-select list,
where the content of select list #2 depends on select list #1. It is
nothing overly fancy, but enough people use Netscape 7+ that I need to
come up with a work-around.

Thank you,
Mike Chabot
http://www.teachers-teachers.com

On 10/18/06, Kurt Mackey <[EMAIL PROTECTED]> wrote:
> The jQuery philosophy has made it much easier to deal with downlevel
> browsers for me.  When I need compatibility, I build the page as I would
> if I weren't using javascript at all.  Links all have hrefs to relevant
> places, elements that should be updated dynamically are filled with data
> on the server side, etc.
>
> Once I'm to that point, I start making jQuery do the cool things.  The
> browsers that can support it get setup within the .ready() event.
>
> As an example, one of the sites I work on has a number of "journals"
> that need to be featured on the frontpage.  The new version will have a
> little tabbed control that updates a headline list.  The tabs themselves
> are completely functional without javascript, they simply have hrefs to
> each individual journal.  With jQuery enabled, my super special function
> grabs that href, alters it to get a json result, then uses that to
> reload the headlines.
>
> The advantage to this approach is: you end up with semantically
> appropriate HTML, and the dynamic functionality is decoupled from the
> page markup.  You won't find <a href="#"> anywhere. :)
>
> So, in summary: build the downlevel functionality first, add the cool
> stuff on top of that.  You'll get cleaner HTML, and it will degrade
> gracefully.
>
> -Kurt
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Mike Chabot
> Sent: Wednesday, October 18, 2006 11:53 AM
> To: [email protected]
> Subject: [jQuery] Handling unsupported browsers
>
> Does anyone have a preferred way for handling browsers that are not
> officially supported by jQuery, such as Netscape? What I am planning
> on doing is having server-side browser detection code which gives me
> the browser name, platform, and version number, then in my site,
> having each page coded in two different ways: one for Ajax and one
> without Ajax. Is this what other people do?
>
> Does anyone have a browser-compatibility chart, where I can see which
> parts of jQuery work in the various browsers?
>
> Thank you,
> Mike Chabot

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to