When the JavaScriptEnabled user setting was introduced, there was no way to 
determine if the browser had JavaScript enabled. I don't know if that has 
changed recently.

The only way to test for JavaScript being enabled is to include a small script 
in the login screen that adds the JavaScriptEnabled parameter to the login 
form. If the user has JavaScript enabled, then the parameter will be included 
in the login form, and ultimately in the login request URL.

I believe the setting is saved in user preferences, so it is persistent during 
the user's session.

If a user has JavaScript enabled when they log in, and then disable it, OFBiz 
won't know about the change - since it is updated only during login.

As long as users have the option to turn off JavaScript, then there will be the 
possibility that they will use OFBiz with it turned off. The OFBiz framework 
accommodates that: lookups are turned off and Ajax requests are converted to a 
page refresh. So, OFBiz still works with JavaScript turned off. In addition, 
the Flat Grey visual theme does not require JavaScript.

-Adrian

--- On Sun, 1/16/11, Jacques Le Roux <jacques.le.r...@les7arts.com> wrote:
> Actually on the backend we already
> rely heavily on javascript enabled, try to disabled it when
> you launch initially with the default 
> theme...
> That's why I asked this question. Moreover sometimes OFBIz
> reacts as if javascript was disabled when actually it's not
> (not sure why 
> yet, but have a look at https://issues.apache.org/jira/browse/OFBIZ-2413)
> 
> More to the point (your question actually): we could try to
> create a cookie using javascript at the beginning of the
> session 
> (LoginWorker.login) and if it's not there we would know
> that somehow we can't use it.
> Because I have not digged deep but I can't understant why
> we use "Y".equals(request.getParameter("JavaScriptEnabled")
> there and rely 
> on it further. It seems to me that it's not reliable.
> 
> I think there is more to say about all that. Because if, by
> a way or another, we know that it's not usable, then we also
> know that 
> some features are not active (again, for instance
> OFBIZ-2413) and we should mark them as disabled, which is
> obviously not done at 
> the moment
> 
> Jacques
> 
> From: "Adrian Crum" <adrian.c...@yahoo.com>
> > How do we determine the user's browser setting?
> >
> > -Adrian
> >
> > --- On Sun, 1/16/11, Jacques Le Roux <jacques.le.r...@les7arts.com>
> wrote:
> >> Hi,
> >>
> >> What was the intial reason to introduce
> JavaScriptEnabled?
> >> Should we not rather rely on the browser setting
> to set it
> >> in user prefs?
> >>
> >> Thanks
> >>
> >> Jacques
> >>
> >>
> >
> >
> >
> > 
> 
> 
> 


      

Reply via email to