On Thu, May 8, 2008 at 4:16 PM, amiribarksdale <[EMAIL PROTECTED]> wrote:
>
> The reason for this is indeed what you say. I have a form that is getting
> wild and hairy, extremely unwieldy, so I want to immediately fork out which
> component I displayed called depending on whether js was enabled.
>

Then you have to be careful of race conditions.  If you want the
server to build a page differently if the user has JavaScript then
Mason needs to know know if the user has JavaScript before it starts
building the page.  This means that you have to store information
about whether the user has JavaScript in the user's session variable
based on a previously visited page.  It also means that this can't be
the first page the user sees when they go to your site (i.e.: user's
won't be able to begin their session by deep linking directly to this
page).

I wouldn't use Ajax for this.  Its much easier to use cookies.  Have
the first page set a cookie via JavaScript and have the next page
attempt to retrieve the cookie.

-- Ben

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to