Hi,
I am trying to open a new webpage from a button onclick action. I saw this feed:
https://community.creatio.com/questions/how-open-new-webpage-button-onc…
I'm very new in Creation so I tried to replicate it on a page definition. What's wrong with the following code:
define("UsrPage_bwxynuo", /**SCHEMA_DEPS*/[]/**SCHEMA_DEPS*/, function/**SCHEMA_ARGS*/()/**SCHEMA_ARGS*/ {
return {
methods: {
openWindow: function() {
var path = this.get("https://fr.wikipedia.org");
window.open(path, '_blank');
}
},
viewConfigDiff: /**SCHEMA_VIEW_CONFIG_DIFF*/[
{
"operation": "insert",
"name": "Button_w36eyol",
"values": {
"itemType": Terrasoft.ViewItemType.BUTTON,
"click": {"bindTo": "openWindow"},
},
"parentName": "MainContainer",
"propertyName": "items",
"index": 0
}
]/**SCHEMA_VIEW_CONFIG_DIFF*/,
viewModelConfig: /**SCHEMA_VIEW_MODEL_CONFIG*/{}/**SCHEMA_VIEW_MODEL_CONFIG*/,
modelConfig: /**SCHEMA_MODEL_CONFIG*/{}/**SCHEMA_MODEL_CONFIG*/,
handlers: /**SCHEMA_HANDLERS*/[]/**SCHEMA_HANDLERS*/,
converters: /**SCHEMA_CONVERTERS*/{}/**SCHEMA_CONVERTERS*/,
validators: /**SCHEMA_VALIDATORS*/{}/**SCHEMA_VALIDATORS*/
};
});