Home
The Toolkit for Online Communities
15902 Community Members, 0 members online, 2457 visitors today
Log In Register

Forum OpenACS Development: Re: Ajax Helper 0.8d committed to CVS HEAD

OpenACS Home : Forums : OpenACS Development : Re: Ajax Helper 0.8d committed to CVS HEAD : One Message

+
Posted by Claudio Pasolini on
Hi Hamilton,

I'd like to generate a yui menu with the ajaxhelper proc ah::yui::menu_from_list and so far I have:

  • installed ajaxhelper from HEAD
  • changed blnk-master.tcl and blank-master.adp following the instructions in the docs
  • created a testyui.tcl :
    set menu_list [list [list "Yahoo" "http://www.yahoo.it"] [list "Google" "http://www.google.it"] [list "Vestasoft" "http://www.vestasoft.com"]]

    ah::yui::menu_from_list \
    -varname mymenu \
    -id actions \
    -menulist $menu_list \
    -arrayname yuimenu

    set script_show $yuimenu(show)
    set script_render $yuimenu(render)

  • but now I'm stuck because I don't know how to proceed with the adp part. I tried to load the rendering script declaring it within the header_stuff property, and actually it is loaded but I get a JS error telling
    Error: missing : after property id
    Could you kindly provide a working example?

+
Posted by Hamilton Chua on
There are tests that demonstrate how to use it in ajaxhelper/www/tests.

In particular, take a look at test_yahoomenu-js.

If ajaxhelper is mounted under /ajax, which it should be by default. Go to http://youropenacsinstant/ajax/tests/test_yahoomenu-js

+
Posted by Claudio Pasolini on
Thank You Hamilton,

I missed the tests directory!