all groups > dotnet jscript > march 2005 >
You're in the

dotnet jscript

group:

string split function problem


string split function problem Akhtar Hussain Shar
3/17/2005 5:05:04 AM
dotnet jscript: Hi Guys,
I am using javascript for string splitting, it works fine, when I use that
code in the html file, but when I create external js file, and use external
file. All other script (including alert, loops,....) works fine except split
function, any idea, following is the code.
var box = document.Form1.lstAddresses;
alert(box.options[box.selectedIndex].value);
var destination = box.options[box.selectedIndex].value;
var myAddress = destination.split("¬");
alert(myAddress[2]);
alert(myAddress[3]);
alert(myAddress[4]);
alert(myAddress[5]);
document.Form1.txtHouseNo.value = myAddress[1];
regards and thanks
Akhtar Hussain
Re: string split function problem Serge Baltic
3/17/2005 5:53:44 AM
[quoted text, click to view]

Encoding problems?

Try saving it in UTF-8 or UCS-2 with a signature at the beginning of the
file (BOM).

(H) Serg

AddThis Social Bookmark Button