Javascript toSource() method not working
<p>I'm getting a "Object doesn't support this property or method error", does anyone know why?</p>

<p>I do have values plugged into userId, fname, lname, oname, sam, hasAccess</p>

<pre><code>function Employee(id, fname, lname, oname, sam, access) {
    this.id = id;
    this.fname = fname;
    this.lname = lname;
    this.oname = oname
    this.sam = sam;
    this.access = access;
}

var emp = new Employee(userId, fname, lname, oname, sam, hasAccess);

var jsonstuff = emp.toSource(); //Breaking here
</code></pre>

<p>Although this link says its possible <a href="http://www.w3schools.com/jsref/jsref%5FtoSource%5Fstring.asp">http://www.w3schools.com/jsref/jsref_toSource_string.asp</a></p>

<p>Thanks everyone.</p>
