hi.
using mootools, and have the follwoing test. the test has an initial function that traps the 'submit' event from the form, so the submit btn invokes the window.addEvent function. this works.
i'm trying to figure out how to call the window.addEvent function from a separate javascript function, ie the saveCollegedata function.
in looking over sites via the net, haven't come up with the correct approach to do this. though about doing a document.forms['myform'].submit(), but that doesn't work..
also thought about doing an onSubmit from the form and calling a different javascript function, but not quite sure how this would work, to be able to also use the "this.send" in the ajax callback.
function saveCollegeData()
{
var t;
t="tt";
alert("t="+t);
// window.top.fireEvent('domready');
// document.forms["adminForm"].submit();
t="tt";
}
//-generate the 2nd coldata frm to mod the data
//-uses the mod-collegedata1.frm page
//-user confirms the data
window.addEvent('domready', function() {
$('adminForm').addEvent('submit', function(e) {
//Prevents the default submit event from loading a new page.
new Event(e).stop();
//alert (foo);
alert ('11111111aaaa ');
//--clear out the div to start.. just in case..
clearJorge();
//--set/reset the task item to the task for
//--the server side.. was set to "" for the toolbar
//-- the "this" should refer to the $('adminForm') form
this.task.defaultValue="mdata2";
.
.
.