DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   Server Side JavaScript compile errors (http://www.daniweb.com/forums/thread52277.html)

Mushy-pea Aug 11th, 2006 10:12 am
Server Side JavaScript compile errors
 
Hello all. I am trying to write an SSJS application to process the submissions from a form on my website. I downloaded the Mono .NET compiler, which has a JScript.NET compiler in it. I believe JScript.NET is a superset of Javascript (and my host has a Javascript runtime engine) so this seemed appropriate. However, I'm getting compile errors from some very basic statements. For example:

<server>
var file1 = 0;
var success = 0;
var first_name = "0";
var surname = "0";
var e_mail = "0";
var add = "0";
var feedback = "0";
 
file1 = new File("/logs/newsgroup.txt");
success = file1.open("a");
file1.close();
</server>

This brings up numerous errors starting with:

/mnt/floppy/thanks.htm (1, 0) Error: msg.syntax
Unhandled exception: System.Exception: must create expr stm with
numerous errors....
numerous errors....

If anyone can point out my silly mistakes I would really appriciate it. Thanks.

Steven.


All times are GMT -4. The time now is 11:50 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC