[HTML_AJAX-devel] The Menu Example of HTML_AJAX does not work

=?gb2312?q?=D3=DA=CB=C9=CC=CE?= yustao at yahoo.com.cn
Sat Jul 1 09:01:17 PDT 2006


Hi,

I am one beginner of using HTML_AJAX. I tried the Demo on the below web page:
http://wiki.bluga.net/index.php?are...X&page=Examples

For the first example "Hello World Demo", it worked after I changed the upper 
case issue in PHP5.

But for the second example "Menu Demo", I tried all kinds of methodes(including changing upper case), but It can not still work. When I load the 
demo as below webpage:
http://htmlajax.org/materials/HTML_...on/MenuExample/
I found one JAVASCRIPT reporting "Error: Object doesn't support this action"

Then I downloaded the whole source code and change the file "controller.php" as below:
    PHP Code:
    <?php 
require_once 'HTML/AJAX/Server.php'; 

class AutoServer extends HTML_AJAX_Server { 
    // this flag must be set for your init methods to be used 
    var $initMethods = true; 

    // init method for my hello world class 
    function initMenuExample() { 
        require_once 'MenuExample.class.php'; 
        $menu = new MenuExample(); 
        $this->registerClass($menu, 'menuexample'); 
    } 

} 

$server = new AutoServer(); 
$server->handleRequest(); 
?> 




Besides this, I also added one "php" tag at the front of the file "MenuExample.class.php", which should be one missing tag from my perspective.
The old:
    PHP Code:
    <? 
class MenuExample 
..... 
?> 



My change:
    PHP Code:
    <?php 
class MenuExample 
..... 
?> 



After this update, no error occurs on the webpage, but the Demo does not still work.
I got the source code from below:
http://htmlajax.org/materials/HTML_...resentation.zip

Thanks in advance!
Yu

 		
---------------------------------
ÇÀ×¢ÑÅ»¢Ãâ·ÑÓÊÏä-3.5GÈÝÁ¿£¬20M¸½¼þ£¡ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://bluga.net/pipermail/html_ajax-devel/attachments/20060702/e2550b56/attachment.html


More information about the Html_ajax-devel mailing list