View Full Version : Function(&Sub) no result passes first run

06-15-2007, 08:54 PM
Has anyone had a Function and/or Sub to produce a result, yet not pass that result to an outside-the-Function variable the first time it is ran?

I response.write in various places inside-the-Function and it operates perfectly; but every time it is ran for the first time the result is erased:

Function sayHello(plugin)
if 1=plugin then functionVariable="Hello there."
if 2=plugin then functionVariable="What's up dude?"
End Function
sayHello 1
sayHello 2

The first paragraph is always <p></p> in View Source, while savedMsg2,3,4,5,etc. is fine the way it should be. And, if I change to a Sub and then Call sayHello (1) the same thing happens.

Very confused.