Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: How to cgi redirect?

From: rebologue::yahoo at: 24-Oct-2002 6:31

Hi Jason-- With that simple Javascript expression, you should be safe for browsers that support Javascript 1.0 and higher (assuming users have it enabled, of course). Here's a list of Javascript version history for Netscape and IE: Netscape Navigator 2 - JavaScript 1 Netscape Navigator 3 - JavaScript 1.1 Netscape Navigator 4 - JavaScript 1.2 Netscape Navigator 4.05 - JavaScript 1.3 Internet Explorer 2 - no JavaScript support Internet Explorer 3.x - partial JavaScript 1 support, depending on platform. Internet Explorer 4 - partial JavaScript 1.1 support I don't know much about support on Opera, maybe their website offers information on that. Some more recommendations: Consider changing the DOM reference to window.location or just location.href (IIRC, location is higher in the DOM than document) -- onClick="location.href=''" Note that if this page is in a frameset, you'll may need to change that to top.location if you want the frameset to be redirected and not just the page. Tip: To avoid mangling the functionality of the browser Back button (due to the redirect), use the replace function instead: <script language="JavaScript"> <!-- if (document.images) location.replace(''); else location.href=''; //--> </script> I wish more sites would use this technique. Finally, follow your script with a "noscript tag" for users that don't have Javascript enabled -- <noscript> <meta http-equiv="refresh" content="0;URL="> </noscript> Hope this helps. Regards, Ed --- Jason Cunliffe wrote: