All pastes #610270 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-07-09 11:18 UTC
rendered paste body
// prototype.js is loaded

        var Controller = new Class.create(); //prototype syntax
        Controller.prototype = { 
    	    initialize: function(){ //constructor
                		    this.viewstate = {'mainview':'products.tpl', 'header':'logo.tpl'};
                            	    this.update_viewstate();
    	    },
            
            update_viewstate: function(){
@@                alert(dump(this.viewstate)); // just returns a not defined!!
            }
            
        };
        var myController = new Controller;