![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I use split in .js files and it works properly. You've got something else going on here but I don't see a problem with your code. The array is zero based so the first element should be myAddress[0]; Do you have these same problems with a different delimiter? -- 2005 Microsoft MVP C# Robbe Morris http://www.robbemorris.com http://www.learncsharp.net/home/listings.aspx "Akhtar Hussain Shar" <Akhtar Hussain Shar (AT) discussions (DOT) microsoft.com> wrote in message news:74810690-93A7-46C1-A27C-9B9891BD1815 (AT) microsoft (DOT) com... 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 |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |