PPRuNe Forums - View Single Post - Prooning gone wrong
View Single Post
Old 19th January 2006 | 17:19
  #8 (permalink)  
Mac the Knife

Plastic PPRuNer
25 Anniversary
 
Joined: Sep 2000
Posts: 1,902
Likes: 0
From: Rochechouart, France
Sorry, I wasn't trying to be stroppy, but "...is a problem with the users browser and its interpretation of javascript." as something immutable just can't be.

A .js script is a .js script, not a mysterious black box that can't be fixed.
If the .js is stripping out <CR> then it's been told to do it, advertently or inadvertently, and needs to be fixed.

The days when webapps would rudely assume thaat everyone worth considering must be running Mr. Gates (now very obsolete) browser are surely long gone.

Even if different browsers do interpret js differently (odd, because most people are using the Sun JRE, since MS has now dropped it's "innovative" [and nonstandard] JRE) then including a browsercheck is trivial.

// BrowserCheck Object
// provides most commonly needed browser checking variables
// 19990326

// Copyright (C) 1999 Dan Steinman
// Distributed under the terms of the GNU Library General Public License
// Available at http://www.dansteinman.com/dynapi/

function BrowserCheck() {
var b = navigator.appName
if (b=="Netscape") this.b = "ns"
else if (b=="Microsoft Internet Explorer") this.b = "ie"
else this.b = b
this.v = parseInt(navigator.appVersion)
this.ns = (this.b=="ns" && this.v>=4)
this.ns4 = (this.b=="ns" && this.v==4)
this.ns5 = (this.b=="ns" && this.v==5)
this.ie = (this.b=="ie" && this.v>=4)
this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0)
this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)
if (this.ie5) this.v = 5
this.min = (this.ns||this.ie)
}

// automatically create the "is" object
is = new BrowserCheck()

Sorry, but it won't wash...
Mac the Knife is offline