If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

When i show the lines variable it looks the same before and after it is split. I loop through the lines after the split but it reads the whole textarea like it is one line. I don't see why the code is not split in the input.

A number of problems:
1. Your SomeFunction is not closed
2. document.all is a deprecated function available in MSIE onlyl
3. document.inverse is undefined
4. t.s12 represents what ???
Instead of having 4 statements in one onclick assignment,
why not just call a single function where the statements are defined there?

Full code for function

Sorry I only posted the part of the function that I thought was causing the issue. Here is the rest of the function. What I am trying to do is take multiple inputs from a text area and return the distant from several latitude and longitude points. The function returns only the first point taken from the text area. I have put alert boxes in several places through out the code and run it and it seems that it is reading all lines in the text area as a single line.

The code does not loop. I stuck and alert box after the line below and I only get one alert no matter how many lines I have in the textarea. I tried the solution from wbport but this did the same thing. Any help would be greatly appreciated.

Fixed

I figured this out. The return was inside the loop so it was returning the value at the end of the first loop. I simply moved the curly bracket above the return and it functions properly now. Thanks to those who replied.