Redim Preserve problems
Why can't I use Redim Preserve in my script?
It works on IIS and another webhotel then i got now.
The webhotel i got now uses Sun Java System Active Server Pages tho.
I get the error:
Error Type:
Sun ONE ASP VBScript runtime (0x800A000D)
Type mismatch
Don't this works on Sun or can u write something else?
[357 byte] By [
Meathook] at [2007-11-26 11:43:15]

# 2
[nobr]Here is the function and its always getting error on the redim preseve lines:
function funcKapa(strText)
Dim arrText, attTextNy
strText = Replace(strText,"<br>","<br> ")
arrText = Split(strText, " ")
j = 0
For i = 0 To UBound(arrText)
If Len(arrText(i)) > 35 Then
If InStr(arrText(i),"http") Or InStr(arrText(i),"https") Or InStr(arrText(i),"ftp") Then
Redim Preserve arrTextNy(j)
arrTextNy(j) = arrText(i)
Else
Do While Len(arrText(i)) > 35
Redim Preserve arrTextNy(j)
arrTextNy(j) = Left(arrText(i), 35)
j = j + 1
arrText(i) = Mid(arrText(i), 36)
If Len(arrText(i)) < 35 Then
j = j + 1
Redim Preserve arrTextNy(j)
arrTextNy(j) = arrText(i)
End If
Loop
End If
Else
Redim Preserve arrTextNy(j)
arrTextNy(j) = arrText(i)
End If
j = j + 1
Next
funcKapa = Join(arrTextNy)
End function
[/nobr]