[Mootools] Comment extension?

Discussion in 'HTML & Website Design' started by mycomputerguide, Mar 3, 2009.

  1. #1
    Hey guys!

    Does anyone know if there is a really nice mootools comment extension available somewhere for users to leave comments (per form) on my site?
     
    mycomputerguide, Mar 3, 2009 IP
  2. mycomputerguide

    mycomputerguide Peon

    Messages:
    71
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    hmm I now decided to simply use mootools to submit the comment form instead of trying to find a mootools comment extension. But my question is how do you submit a form in mootools? I found some code through google which does this, but I don't see anywhere in the code that it processes a PHP file, anyone can tell me more about this?

    Here is the code:

    
    window.addEvent('domready', function(){
        $('adminEdit').addEvent('submit', function(e) {
            /**
             * capture submitbutton name
             */
            var submitValue = e.explicitOriginalTarget.id;
            var pb = $('adminEdit').toQueryString() + "&" + submitValue + "=1";
            /**
             * Prevent the submit event
             */        
            new Event(e).stop();
     
            /**
             * This empties the log and shows the spinning indicator
             */
            var log = $('log_res').empty().addClass('ajax-loading');
     
            /**
             * send with Ajax
             */
            var url = $('adminEdit').getProperty('action');
     
            new Ajax(url, {
                method: 'post',
                update: log,
                data: pb,
                evalResponse:true,
                onComplete: function() {
                    log.removeClass('ajax-loading');
                }            
            }).request();        
        });
    });
    
    Code (markup):
     
    mycomputerguide, Mar 3, 2009 IP
  3. mycomputerguide

    mycomputerguide Peon

    Messages:
    71
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    aah i'm being stupid, after searching a bit more I understood it's done by the form action url :)

    This thread can be closed now.
     
    mycomputerguide, Mar 3, 2009 IP