Thursday, June 29, 2006

Actualy, I tried to submit a form to our server, but it has to go through AJAX protocol. I wish I could do it on mochikit library, but in order to mr.Bob Ipolito said, "there no plan to add a POST mechanism on mochi library". So I'm stuck.

Lucky me , Dojo library support it, they support form submit via XMLHTTPRequest protocol. Its little be hard to find how to do it, since dojo still under heavy development, but thanks to, heres the way I did on my code :

This is part of my button action / signal

var my_url = this.ajax_url+"ajax/ajax.items.php?task=test";{ url : my_url,
load: function(type, data, evt)
var rows = data.rows;
var cols = data.columns;
the_object.value = data;
formNode: getElement("aoiForm"),
mimetype:'text/json' });

You may found in this part of javascript code, there's as simple as mochikit did. Thats why I'll stick my GET method with mochikit and do the POST method with dojo.

No comments: