Forum consepet
You are not logged in. Please Login.


Posted: Nov 25, 2023 5:53:57 am
cgetty




Go to a particular tab

      _button1_onclick:function (profile, e, src, value) {
            this.tabTest1.setValue('a',true);
  },

ns.ctl_image_smallredlk.updateItem("e",{hidden:false});

.setVisibility("visible")

ns.ctl_image_smallredlk.updateItem({hidden:false});


ns.ctl_image_smallredlk.setVisibility('hidden');

linb
When editing tabs (adding or removing don't use the jason editor, do it in the code. Long string

This code works to click on a image and make it hidden
      _ctl_image4_onclick : function(profile,e,src){
          this.ctl_image4.setVisibility('hidden');           
        }



Posted: Nov 25, 2023 6:50:13 am
cgetty





// Simple Animate
// The default code is a com class (inherited from linb.Com)
Class('App', 'linb.Com',{
    // Ensure that all the value of "key/value pair" does not refer to external variables
    Instance:{
        // To initialize instance(e.g. properties)
        initialize : function(){
            // To determine whether or not the com will be destroyed, when the first UI control be destroyed
            this.autoDestroy = true;
            // To initialize properties
            this.properties = {};
        },
        // To initialize internal components (mostly UI controls)
        // *** If you're not a skilled, dont modify this function manually ***
        iniComponents : function(){
            // [[code created by jsLinb UI Builder
            var host=this, children=[], append=function(child){children.push(child.get(0))};
           
            append(
                (new linb.UI.SButton)
                .setHost(host,"ctl_sbutton1")
                .setLeft(130)
                .setTop(70)
                .setCaption("click me")
                .onclick("_ctl_sbutton1_onclick")
            );
           
            return children;
            // ]]code created by jsLinb UI Builder
        },
        // Give a chance to load other com
        iniExComs : function(com, threadid){
        },
        // Give a chance to determine which UI controls will be appended to parent container
        customAppend : function(parent, subId, left, top){
            // "return false" will cause all the internal UI controls will be added to the parent panel
            return false;
        },
        // This instance's events
        events : {},
        _ctl_sbutton1_onclick : function (profile, e, src, value) {
            linb.Dom.animate({backgroundColor : '#ff0000'},
                            {
                                left : [0,200],
                                top : [0,300],
                                width : [30,300],
                                height : [30,300],
                                opacity : [1,0]
                            },
                            null,null,500,50,'sineOut').start()
        }
    }
});



Posted: Jun 29, 2024 2:56:38 am
cgetty




This is GOOD loads file to grid
This code shows how to load a json file from anywhere. This code comes from this program.
ImportFoodItemsToGridFromfile

    _ctl_buttonviews1_oninipanelview : function (profile, item) {
            var ns=this;
            if(item.id=='json'){
                  xui.Ajax("http://vb4.xp3.biz/cathy/data/data.json","",function(rsp){
//                xui.Ajax("data/data.json","",function(rsp){
                    var data =rsp;
                    if(!data)alert("no data");
                    else{
                        if(data.header)
                            ns.treegrid1.setHeader(data.header);
                        if(data.rows)
                            ns.treegrid1.setRows(data.rows);
                    }
                }).start();
            }
        },

Update note. running this in the ide of crossui can read the data file
http://vb4.xp3.biz/cathy/data/data.json.

But when I deploy on the web only can read from same domain


Quick Reply
User Name:
Message:

Powered by myUPB v2.2.7  ·   © PHP Outburst 2002 - 2024

Creative Commons License