This project has moved and is read-only. For the latest updates, please go here.

callback problem

Nov 17, 2011 at 11:30 AM

Hi

I'm trying to do a simple callback, is this possible?

    function test() {  }

    alert(test());

Have any suggestions for this?

Thanks.

Nov 17, 2011 at 1:45 PM

Callbacks works in Jurassic, however, your code isn't supposed to do anything at all. You define a empty function and then try to alert the result, which would always be undefined. Also, I don't know if alert is defined in jurassic, as that normally is a GUI function in most browsers.

Nov 18, 2011 at 1:30 AM

alert is defined myself.

Just like you say, callbacks works fine in Jurassic.

I used the wrong way.

Thank you.

Nov 18, 2011 at 2:31 AM

alert is not defined in Jurassic (doesn't really make sense in an embedded environment).