[Nitro] Official Repo

Massimo Maria Ghisalberti nissl at tiscali.it
Fri Apr 21 04:46:40 EDT 2006


the request URi is 

/get_content?params=menu_item_001&_=

the last part of the query string is a prototype.js addendum, &_=

the html code generated

<a href="#" id="menu_item_001" onclick="__nc_getSection(this.id); return
false"> home  </a>

__nc_getSection js code:

            function __nc_getSection(params) {
              $('spinner').style.display = 'block';
      new Ajax.Updater(
        { success: 'content_area' },
        '/get_content', 
        {
          method: 'get',
          parameters: get_client_info(params, false), 
    
        onLoading: function(request) {
          $('spinner').style.display = 'block';
        },
      
        onComplete: function(request) {
          $('spinner').style.display = 'none';$('content_area').style.display = 'block';propagate_content_info()
        }        
      
        }
      );
    
            }

the get_client_info(params, false) return the query string for get method: params=menu_item_001 in this case.

a simple workaround for controller method is get_content(location, param2 = nil, param3 = nil)

:) but why 3 parameters if only one is send? (or max two with the prototype &_=)

ciao



Il giorno gio, 20/04/2006 alle 13.33 -0700, Bryan Soto ha scritto:
> On 4/20/06, Massimo Maria Ghisalberti <nissl at tiscali.it> wrote:
> > E, [2006-04-20T21:35:12.527002 #17075] ERROR -- : Error while handling
> > '/get_content'.
> > E, [2006-04-20T21:35:12.527453 #17075] ERROR -- : wrong number of
> > arguments (3 for 1)
> >   (eval):20:in `get_content'
> >   (eval):20:in `get_content_action'
> 
> Hmm... what's the url that it's generating in the html page?
> 
> --
> "Never tell people how to do things. Tell them what to do and they
> will surprise you with their ingenuity." —General George S. Patton
> 
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
-- 
Massimo Maria Ghisalberti <nissl at tiscali.it>





More information about the Nitro-general mailing list