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

how to surpress modal

1 Answer 39 Views
Show your code
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mark
Top achievements
Rank 1
Mark asked on 23 Feb 2016, 04:31 PM
I have this login "modal" div in my index.html file...
 
<div data-role="modalview" id="login" style="width: 90%" data-model="loginView">
    <div data-role="header">
        <div data-role="navbar">
            <span>Login</span>
        </div>
    </div>
    <ul data-role="listview" data-style="inset">
        <li>
            <label>
                UserId
                <input type="text" data-bind="value: userid">
            </label>
        </li>
        <li>
            <label>
                Password
                <input type="password" data-bind="value: userpwd">
            </label>
        </li>
    </ul>
    <button data-bind="click: login" class="add-button" data-role="button">Login</button>
    <button data-bind="click: close" class="close-button" data-role="button">Close</button>
</div>

 

It works fine when i trigger it in the drawer with...

<div data-role="drawer" id="app-drawer">
    <div data-role="header">
        <div data-role="navbar">
            <span data-role="view-title">Menu</span>
        </div>
    </div>
    <ul data-role="listview">
        <li><a href="#login" data-rel="modalview" data-icon="home">Login</a>
        </li>
        <li><a href="#index" data-icon="home">Home</a>
        </li>
        <li><a href="views/favorites.html" data-icon="favorites">Favorites</a>
        </li>
        <li><a href="views/about.html" data-icon="globe">About</a>
        </li>
    </ul>
</div>

 

the problem is that when index.html is first loaded, the modal window "flashes" on the screen for a second before disappearing...

what is the best way to make sure this div doesnt get displayed until its called from the drawer?

 

1 Answer, 1 is accepted

Sort by
0
menriquez
Top achievements
Rank 1
answered on 25 Feb 2016, 06:13 PM
never mind i figured it out.
Tags
Show your code
Asked by
Mark
Top achievements
Rank 1
Answers by
menriquez
Top achievements
Rank 1
Share this question
or