Hi Dale, Unfortunately there is no simple answer to that question. It can depend on your style of application, what the purpose of the detection is and so on...
But basically, you need a preceding webpage that does the detection for you, then passes the results back to the server. You could have a User scope variable that says ScriptingChecked (true or false), if empty, redirect the user to your detection webpage. The detection webpage automatically checks for scripting and redirects them back with an extra argument or something. Something like <script> location.href = 'some.taf?scripting=true'; </script> <noscript> <META HTTP-EQUIV="REFRESH" CONTENT="1; URL=some.taf?scripting=false"> </noscript> If argument "scripting" is true, then assign ScriptingChecked to true, else if JavaScript is disabled, the noscript tag will run and the meta tag will give your argument a false value (if META redirects are not disabled). You could also marry the above with some Ajax or IFRAME stuff to prevent page reloading. > Try <@HTTPATTRIBUTE NAME="USER_AGENT"> That can give you the name of the browser (if the browser is being honest), but doesn't tell you anything with regards to scripting being enabled. Hope that helps. Scott, > -----Original Message----- > From: Dale Graham [mailto:[EMAIL PROTECTED] > Sent: Friday, May 11, 2007 10:50 AM > To: [email protected] > Subject: Re: Witango-Talk: Javascript problem - detecting browsers with JS > turned off > > Heh heh, now that you've explained where I've gone wrong, what > approach *should* I be taking? That is, I don't know how to put the > cart after the horse.... > > On May 11, 2007, at 9:40 AM, Scott Cadillac wrote: > > > Hi Dale, hopefully I've understood your question, so... > > > > Witango is a server-side language, meaning it only executes on the > > server. > > > > HTML and JavaScript are client-side languages, meaning at the > > server level > > (when Witango is executing) your HTML and JavaScript is meaningless > > text > > (ignored by Witango) and is not executed by the browser until > > "after" your > > Witango code has finished executing and sent the results to the > > browser > > (client), then your HTML and JavaScript will be executed. > > > > You're putting the cart (JavaScript) before the horse (Witango). > > > > Hope this helps. > > > > ~~~~~~~~~~~~~~~~~~~~ > > Scott Cadillac > > Email: [EMAIL PROTECTED] > > Skype: 401-429-6949 > > Cell: 902-957-2449 > > > > XML-Extranet > > http://www.xmlx.net/ > > ~~~~~~~~~~~~~~~~~~~~ > > > > > >> -----Original Message----- > >> From: Dale Graham [mailto:[EMAIL PROTECTED] > >> Sent: Friday, May 11, 2007 10:13 AM > >> To: Witango-Talk list > >> Subject: Witango-Talk: Javascript problem - detecting browsers > >> with JS > >> turned off > >> > >> I decided it was best to use something like object detection because > >> JS can be disabled even in JS-capable browsers and I was having > >> display issues if JS was turned off... so I wanted to set something > >> up to work either way. > >> > >> BUT I am running into really huge issues implementing this, because > >> things seem to be working "not as advertised" in both Firefox and in > >> Safari (I haven't even begun to attempt IE!) > >> > >> There are two different problems here. > >> > >> 1] This does a test for javascript (inside a script tag), and if it > >> works, writes out a variable > >> > >> <pre> > >> > >> <script language="javascript"> > >> if document.write { > >> document.write("<@assign name=request$donext > >> value=firstreview>"); > >> } > >> </script> > >> > >> </pre> > >> > >> However if javascript is turned OFF in either Firefox or Safari, it > >> still creates (writes out) the variable!! Huh? > >> > >> > >> 2] > >> > >> <pre> > >> > >> <noscript><@assign name="request$donext" value=""></noscript> > >> > >> </pre> > >> > >> And this is supposed to null out the "donext" variable ONLY if > >> javascript is not present/disabled. But the variable is nulled when > >> JS is on OR off! What's going on here? > >> _____________________________________________________________________ > >> ___ > >> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf > > > > ______________________________________________________________________ > > __ > > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf > > > ________________________________________________________________________ > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
