Server side form validation problem

Hello!

There is a form identified by the id property as ‘jogokform’. The form designed for create and modify user group, password and username of users. I want to create a dataprocessor for the form …

var dpJogok = new dhx.DataProcessor({
			master:$$('jogokform'),
			autoupdate:false,
			url:"dsDolgozoJogok.php"
});

… because I must check some fields server side, for example reserved usernames.
But for the code above I get following error:

Uncaught TypeError: Object # has no method ‘attachEvent’ . . . . . . . . . touchui.js:337
dhx.DataProcessor.dhx.proto.da . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . touchui.js:337
i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .touchui.js:14
(anonymous function) …

What I messed up?

In above code “jogokform” is ID of the form, right ?

Can you please provide full source code, which includes init of the form.

First things first: Thank You for your help!

Of course

The code is available at: http://varroda.csip.eu/jogokform-investigation.php

DataProcessor designed to works with collections of data, so it will not work with form.
Normally you need not complex state processing for form and can use

dhx.ajax().post("some.php", $$('form').getValues(), function(text){ if (text == "invalid") //just for example show_message_to_user(); });
Above syntax can be used with connector script ( if you are using it )
docs.dhtmlx.com/doku.php?id=dhtm … _changes&s[]=simple&s[]=form

If you really want to use dataprocessor, you can create a dhx.DataCollection, init dataprocessor with master pointing to data-collection and bind form to data-collection. (form.save() will push data back to data-collection, which will trigger related actions of dataprocessor) - but it looks as over-complicated scheme for your use-case.

THX!

But I think this will more informative for user:

dhx.ajax().post("some.php", $$('form').getValues(), function(text){
   if (text != "OK") //just for example
        show_message_to_user("text");
});