Error in client and server side scripting

Hi,

Please help me to sort out the issue.

I have written client side function

and severside scripting

I didnt write any functionality inside mymethd but its throwing error in doctype

May i know whats the error and how to solve it

specify the document you want to call as a parameter:

cur_frm.call({
    method: "mymethod",
    doc: cur_frm.doc,
    callback: function(r) { alert(r);}
});

cur_frm.call looks like a convenience wrapper for frappe.call. Without the document name you’ll need a fully qualified path to your whitelisted python method