WebOS 3.0 Enyo Button Onclick event
i think its an easy question but i am stuck ...
now i am developing for PalmPAD with WebOS 3.0 and i want to design login system in that.
now i want to know if user click on (in login.js page) Register Button on click event i need to open my register.js page
in doc i found this code
Code:
enyo.kind({
name: "MyApps.Sample",
kind: "enyo.VFlexBox",
style: "width: 400px; padding: 5px",
components: [
{kind: "CustomButton", caption: "unstyled (CustomButton)",
onclick: "buttonClick"},
{kind: "Button", caption: "styled (Button)", onclick: "buttonClick"}
],
buttonClick: function() {
// respond to click
}
});
in this buttonClick: function() what 开发者_开发问答should i write to navigate to the register.js page?
follow this code:
buttonClick: function() { enyo.create({kind: "register"}).renderInto(document.body); } "register" kind is name of the kind of created in register.js file
ex: register.js enyo.kind({ name: "register", kind: "enyo.VFlexBox", style: "width: 400px; padding: 5px", components: [ //add the components whatever you want ],
});
Thanks
精彩评论