Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hi,
I want to change the popup on the click of the next and the previous button.For example: If I am on the first popup/panel and when I click on previous then it will not work and when I click on next then it will go the second popup and similarly to the third and consecutive popups and when I am on the last popup and click on the next then it must give me message and when I click on previous pages from either of the pages or from the last popup it will perform accordingly.Here is my code snippet.Please help me in performing the same functionality.
Thanks & regards,
Swapnil More
$scope.getPrev = function() {
if ($scope.app.params.panelVisible > 0) {
$scope.app.params.panelVisible --;
}
};
$scope.getNext = function() {
if ($scope.app.params.panelVisible < 2) {
$scope.app.params.panelVisible ++;
}
}
Solved! Go to Solution.
Hi Swapnil More,
One way to implement this scenario is as follows:
$scope.nextPopup = function()
{
if($scope.app.params.nextPopup == 0)
{
$scope.app.params.PreviousLabel = false;
$scope.app.params.popup1 = true;
$scope.app.params.nextPopup = 1;
}
else if($scope.app.params.nextPopup == 1)
{
$scope.app.params.popup1 = false;
$scope.app.params.popup2 = true;
$scope.app.params.nextPopup = 2;
}
else if($scope.app.params.nextPopup == 2)
{
$scope.app.params.popup2 = false;
$scope.app.params.popup3 = true;
$scope.app.params.nextPopup = 3;
}
else if($scope.app.params.nextPopup == 3)
{
$scope.app.params.popup3 = false;
$scope.app.params.LastLabel = true;
$scope.app.params.nextPopup = 3;
}
}
$scope.previousPopup = function()
{
if($scope.app.params.nextPopup == 3)
{
$scope.app.params.popup3 = false;
$scope.app.params.popup2 = true;
$scope.app.params.LastLabel = false;
$scope.app.params.nextPopup = 2;
}
else if($scope.app.params.nextPopup == 2)
{
$scope.app.params.popup2 = false;
$scope.app.params.popup1 = true;
$scope.app.params.nextPopup = 1;
}
else if($scope.app.params.nextPopup == 1)
{
$scope.app.params.PreviousLabel = true;
$scope.app.params.popup1 = false;
$scope.app.params.nextPopup = 0;
}
else if($scope.app.params.nextPopup == 0)
{
$scope.app.params.PreviousLabel = true;
$scope.app.params.nextPopup = 0;
}
}
Hope this helps!
I tried this code as you told me but it's not working actually i tried same one before few days but it doesn't work
if you have any other way pl. tell me.
Please ignore the video I uploaded on 10/12.
Here is the video I intended to upload.
I know this method but this method not useful in Realwear HMT 1.
If you can do it with single Next and Previous buttons then tell me.
Can you send me JS code use for that ?
Attached is the project.
Thanks