Hi Alan thanks for the reply,

I think that or I don't understand the embedded javascript or its
broken. I have downloaded the desktop nightly build today. See the
examples:

1) This has been taken literally from the manual wrapped in test.cfm.
This example produces 10. It works!! :)

<cfscript language="javascript">
        function addNumbers( a, b ){
          return a+b;
        }

        var r = addNumbers(2, 8);

        $cf.print( r );
</cfscript>

2) This is a much simpler version of number 1 wrapped again in
test.cfm. Should produce 10. It fails :(
Gives a server Exception with java.lang.NullPointerException

<cfscript language="javascript">
        var r = 2 + 8;

        $cf.print( r );
</cfscript>

3) Here comes the odd. A mixture of both. The code is 2 but I have
added the function addNumbers that do NOTHING. Produces 10. It works
o_O

<cfscript language="javascript">
        function addNumbers( a, b ){
          return a+b;
        }

        var r = 2 + 8;

        $cf.print( r );
</cfscript>

Conclusions: Do I have to put a function inside the js script to make
it work even if I don't use it or the javascript is broken?

-- 
online documentation: http://openbd.org/manual/
   google+ hints/tips: https://plus.google.com/115990347459711259462
     http://groups.google.com/group/openbd?hl=en

Reply via email to