Is it possible to call multiple functions at same time in same time in js of button ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Is it possible to call multiple functions at same time in same time in js of button ?
Solved! Go to Solution.
- Labels:
-
Mashup-Widget
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
instead of having 5 models in the 3d canvas, use only one model and use the BUTTON to change the source.
var modelEle1 = angular.element(document.getElementById('model-1'));
$scope.A=function(){
$scope.view.wdg['model-1']['src'] = 'app/resources/Uploaded/A.pvz';
$timeout(function() {modelEle1.scope().playAll();},300);
};
AT THE EVENT OF BUTTON 1 RECALL A();
$scope.B=function(){
$scope.view.wdg['model-1']['src'] = 'app/resources/Uploaded/B.pvz';
$timeout(function() {modelEle1.scope().playAll();},300);
};
AT THE EVENT OF BUTTON 2 RECALL B();
etc......
I hope to be proved helpful
Giuseppe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@M_shah Yes you can call multiple JS function at the same time. e.g. on click of button try updating value of 2 label widget text and it should work.
-Durgesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @dupatel
thank you for your concern..but i have one doubt mentioned below
If i have 5 model in my 3D canvas and 5 corresponding buttons to each model in 2D canvas....Then how to make experience in such a way that if i can click on particular button than only that model is visible and play it's sequence .?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
instead of having 5 models in the 3d canvas, use only one model and use the BUTTON to change the source.
var modelEle1 = angular.element(document.getElementById('model-1'));
$scope.A=function(){
$scope.view.wdg['model-1']['src'] = 'app/resources/Uploaded/A.pvz';
$timeout(function() {modelEle1.scope().playAll();},300);
};
AT THE EVENT OF BUTTON 1 RECALL A();
$scope.B=function(){
$scope.view.wdg['model-1']['src'] = 'app/resources/Uploaded/B.pvz';
$timeout(function() {modelEle1.scope().playAll();},300);
};
AT THE EVENT OF BUTTON 2 RECALL B();
etc......
I hope to be proved helpful
Giuseppe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator