Re: [Zope] Check for JavaScript: (OT)
On Fri, 03 Nov 2000, Oleg Broytmann wrote: htmlhead script languagae=javascript window.location = "/site/with/js/" /script meta http-equiv=refresh content="5; url=/site/nojs/" /headbody pLoading, please wait.../p /body/html assigning to location.href breaks the history (the redirecting page is added to the history and pressing back will get you to the redir page and, voila, forward you again). annoying. try to use location.replace() whenever possible. somehow like: script language=javascript !-- if ( !document.images ) // guard against pre js1.1 browsers window.location.href = '/with/js/'; else window.location.replace( '/with/js/' ); // -- /script be aware also that having a redirecting start page will cause problems for some (most?) spiders and your site will never show up in the search engines. regards, stefan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Check for JavaScript: (OT)
On Fri, 3 Nov 2000, Stefan H. Holek wrote: be aware also that having a redirecting start page will cause problems for some (most?) spiders and your site will never show up in the search engines. In any case javascriptfull pages are spiders-unfriendly, so it is not a problem at all :))) Oleg.(All opinions are mine and not of my employer) Oleg Broytmann Foundation for Effective Policies [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Check for JavaScript:
Hey all, Is there a way from zope to check to see if a user has Javascript enabled Thanks, Dan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Check for JavaScript:
On Thu, 2 Nov 2000, Daniel Rusch wrote: Is there a way from zope to check to see if a user has Javascript enabled There is no. Advice: client issues should be dealt with on client side. Oleg. Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Check for JavaScript:
Advice: client issues should be dealt with on client side. Great I agree completely, except if the client has Java/JavaScript turned off it is pretty darn difficult to have client issues dealt with on client side!! Dan Oleg Broytmann wrote: On Thu, 2 Nov 2000, Daniel Rusch wrote: Is there a way from zope to check to see if a user has Javascript enabled There is no. Advice: client issues should be dealt with on client side. Oleg. Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Check for JavaScript:
On Thu, 2 Nov 2000, Daniel Rusch wrote: Advice: client issues should be dealt with on client side. Great I agree completely, except if the client has Java/JavaScript turned off it is pretty darn difficult to have client issues dealt with on client side!! htmlhead script languagae=javascript window.location = "/site/with/js/" /script meta http-equiv=refresh content="5; url=/site/nojs/" /headbody pLoading, please wait.../p /body/html Oleg. Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Check for JavaScript:
[Daniel Rusch] | Hey all, | | Is there a way from zope to check to see if a user has Javascript | enabled Well, you may be able to set a cookie, with JavaScript, and then on the next page load, check for that cookie via REQUEST.. I.e.: On page 1, have a JavaScript command that sets a cookie (don't rembember how, from the top of my head); and subsequently, check for this cookie on the next page: * Use JavaScript to set a cookie on a page * Then (optionally) refresh to a new page, and test for the cookie. Or just have this feature on a front page or something similar.. Hmm, come to think of it, there may be an easier way (presuming the user hasn't turned images off): Enter a tag, something like this: script type="text/javascript" // !-- document.write( 'img src="http://www.yourhost.com/js-test/session/cookie_session_id"' ); // -- /script Oh, and there's the obvious (and cleaner?) way of embedding a script tag with a refresh request, something like: script type="text/javascript" // !-- document.location = 'http://www.yourhost.com/javascript-index.html'; // -- /script HTH. -Morten ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Check for JavaScript:
To expand on Peterson's idea, this is what I've used to test java script and cookies. Instructions at the top of the page instruct the user to reload to get accurate readings (for cookies) see: http://linux.library.appstate.edu:8080/Zope_Server/Forms/SAAT/Proxy/ A page I'm working on to trouble shoot user problems when using our library proxy service. There is a hidden input in the if statement of the javascript, I have not tested to see if it sets that value every time the page loads or not anyway. One problem with the trouble shooting page is user's cache settings and when to reload pages. The actions for the submit buttons have not been created yet. tr td bAre Cookies enabled:/b dtml-if expr="RESPONSE.setCookie('uname','test', expires= (ZopeTime() + (1.0/102.0)))"/dtml-if /td td valign=bottom dtml-if "REQUEST.has_key('uname')" FONT COLOR='GREEN'bYES, You Do Have Cookies Enabled/b input type=hidden name=cookieyes value=t size=24 dtml-else FONT COLOR='RED'bNO, Your browser is not accepting cookies/b input type=hidden name=cookieyes value=f size=24 /dtml-if /td /tr tr td bIs Javascript enabled:/b /td td valign=bottom noscript FONT COLOR="RED"BNO, Your browser is not Javascript enambled/Bbr Proxy resources require JavaScript./FONT /noscript script language="JavaScript" document.cookie="Test=Success" cookieString=document.cookie; if (cookieString.indexOf("Test=Success") != -1) { document.write("FONT COLOR='GREEN'BYES, You Do Have Javascript enabled/B/FONTinput type=hidden name=javayes value=t size=24");} /script /td /tr Thomas PS. Is there a way to read the client's proxy setting directly? Daniel Rusch wrote: Hey all, Is there a way from zope to check to see if a user has Javascript enabled Thanks, Dan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) -- Rock and Rule Zope Rocks -- http://www.zope.org Python Rules -- http://www.python.org Thomas McMillan Grant Bennett Appalachian State University Computer Consultant IIIUniversity Library [EMAIL PROTECTED] http://www.library.appstate.edu/webmaster/ Voice: 828 262 6587 FAX:828 262 3001 Windows 95 is a 32-bit extension to a 16-bit patch for an 8-bit operating system that was originally coded for a 4-bit microprocessor. - Chris Dunphy Boot Magazine ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Check for JavaScript:
On Fri, 03 Nov 2000, Oleg Broytmann wrote: On Thu, 2 Nov 2000, Daniel Rusch wrote: Advice: client issues should be dealt with on client side. Great I agree completely, except if the client has Java/JavaScript turned off it is pretty darn difficult to have client issues dealt with on client side!! htmlhead script languagae=javascript window.location = "/site/with/js/" /script meta http-equiv=refresh content="5; url=/site/nojs/" /headbody pLoading, please wait.../p /body/html This is a beautifuly simple solution the only things I could think of to improve it is: 1) comment out your javascript. It's not required, true, but it's a sensible safety measure. 2) put the meta tag in a noscript tag. Again, this is for extra safety... you just never know. (o8 In fact... this is the first time i've seen a META tag usage I condone... otherwise they just seem pointless to me. (o8 Oleg. Have a better one, Curtis Maloney. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )