Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1080089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:58:19+00:00 2026-05-16T21:58:19+00:00

using mootools, and have the follwoing test. the test has an initial function that

  • 0

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";
        .
        .
        .
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T21:58:20+00:00Added an answer on May 16, 2026 at 9:58 pm

    use the fireEvent() method ( http://mootools.net/docs/core/Element/Element.Event#Element:fireEvent )

    $("adminForm").fireEvent("submit");

    $("adminForm").submit(); should also work

    there’s a chance you may need to pass on an object like this with the fireEvent():

    element.fireEvent("submit", {
        stop: Function.from
    }); 
    

    you would do this if you have an event.stop() in the callback. similarly, event.target or any other property you may refer to needs to be simulated.

    although sort of thing this is more valid for 1.2.x whereas you are probably on 1.1x where it goes through the Event object instance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using mootools I have a 'builder' class that manufactures form objects, dynamically creating divs
Following is my JavaScript (mootools) code: $('orderNowForm').addEvent('submit', function (event) { event.preventDefault(); allFilled = false;
I have a form that uses formcheck (a MooTools class that allows you to
Using mootools I have a regex like this: new RegExp('^([^\\D'+ separator +']+)(\\d{2})'); In a
I have been using mootools for a year now. I need to use jquery
I have a jQuery code, but need it working by using Mootools: if (
I've been using Mootools for the last couple of months without knowing that MS
I am new to Mootools and have been using jQuery for a while. What
I have found a MooTools version of Nivoo Slider that (in theory) will work
I'm using mootools 1.4.1 and I'm trying to get a div that 'tweens' the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.