i suggest you read a bit more about programming
nah just kidding
sResult is the RESULT of the function your executing so its sent as the function result when the function ends. everything else in the function is executed immediately. so thats why the form is opened before the text is sent.