problem with string.split() ?
-
Hmmm... something is quite strange here.
str = String(str).split(defaultDateSep)
will actually return a javascript error (only in Netscape) stating that [object Object] is not a constructor. This code actually performs a few times correctly before it crashes. This one's leaving me puzzled. Anyone have any clue what might be happening with this? :confused: Thanks! Lawson Software - Desktop developer Chris Klecker -
Hmmm... something is quite strange here.
str = String(str).split(defaultDateSep)
will actually return a javascript error (only in Netscape) stating that [object Object] is not a constructor. This code actually performs a few times correctly before it crashes. This one's leaving me puzzled. Anyone have any clue what might be happening with this? :confused: Thanks! Lawson Software - Desktop developer Chris KleckerTry splitting the code out into multiple lines. This way if/when it crashes you will have a better idea of what the problem is.
-
Hmmm... something is quite strange here.
str = String(str).split(defaultDateSep)
will actually return a javascript error (only in Netscape) stating that [object Object] is not a constructor. This code actually performs a few times correctly before it crashes. This one's leaving me puzzled. Anyone have any clue what might be happening with this? :confused: Thanks! Lawson Software - Desktop developer Chris KleckerWhich version of netscape are you having problems in? I tried your code in NN 4.7 and 6.1 and it worked fine. If you are doing it in NN 3, it does not support the split method. Here is a more robust way of coding this though. var sTemp = new String(str); var sStrings = sTemp.split(defaultDateSep); Hope this helps. Bill Kim frogwerk Inc.
-
Which version of netscape are you having problems in? I tried your code in NN 4.7 and 6.1 and it worked fine. If you are doing it in NN 3, it does not support the split method. Here is a more robust way of coding this though. var sTemp = new String(str); var sStrings = sTemp.split(defaultDateSep); Hope this helps. Bill Kim frogwerk Inc.
thanks for the help. It turns out it was linked to someone using the following line earlier in the program
var Array = arrayTemp;
oh well... the frustration of having to maintain someone elses code. ;-) "Why are we hiding from the police, Daddy?" "We use VI, son. They use Emacs."