This is a migrated thread and some comments may be shown as answers.

accessing switch in another view

1 Answer 29 Views
Switch (Mobile)
This is a migrated thread and some comments may be shown as answers.
bjadams
Top achievements
Rank 1
bjadams asked on 10 Aug 2012, 08:20 PM
i have 2 views, the "main page" view and the "settings" view.

the "main page" view fires up as soon as the app starts and the "settings" view fires up when the user clicks on the settings icon.

i want to access a switch in the "settings view" from the "main view". 

the problem is that right now unless the user clicks the "settings view" first, the switch is not initialised so it is inaccessible.

what options do i have to make the switch on the "settings view" initialised from the very start?


thanks

1 Answer, 1 is accepted

Sort by
0
Ali
Top achievements
Rank 1
answered on 04 Sep 2012, 11:43 AM
I faced a similar issue, I solved it by adding my code to access the switch in that view in a function, then using 
<div data-role="view" id="myviewid" data-before-show="myfunction">

To call my function before showing the view, and it works well.

Reference: http://docs.kendoui.com/api/mobile/view
Tags
Switch (Mobile)
Asked by
bjadams
Top achievements
Rank 1
Answers by
Ali
Top achievements
Rank 1
Share this question
or