jquery mobile popup problem

833 views
Skip to first unread message

J.D. Schuitemaker

unread,
Sep 13, 2012, 5:11:02 PM9/13/12
to phon...@googlegroups.com
I am trying to make a form popup with phonegap and I am using jquery mobile 1.1.0.

I took the code from the docs (http://jquerymobile.com/branches/popup-widget/docs/pages/popup/index.html#&ui-state=dialog) which looks like this:
		<div data-role="popup" id="popupLogin" data-overlay-theme="b" data-theme="a" class="ui-corner-all">
			<form>
				<div style="padding:10px 20px;">
				  <h3>Please sign in</h3>
		          <label for="un" class="ui-hidden-accessible">Username:</label>
		          <input type="text" name="user" id="un" value="" placeholder="username" data-theme="a" />

		          <label for="pw" class="ui-hidden-accessible">Password:</label>
		          <input type="password" name="pw" id="pass" value="" placeholder="password" data-theme="a" />

		    	  <button type="submit" data-theme="b">Sign in</button>
				</div>
			</form>
		</div>


The docs-page (see link above) doesn't show the popup when the page is opened, I have to click the 'form'-button to see the popup dialog. However when I put the code above in my content-div the contents of my popup are shown when I run the Phonegap app. I prefer not to show the dialog, untill I open it through $('#popupLogin').popup(); (which is the suggested way to open the dialog programmatically).

What can I do to avoid that the popup is shown when the app starts?

Thank you in advance!

Fmnsoft Dave

unread,
Sep 14, 2012, 5:21:19 AM9/14/12
to phon...@googlegroups.com
By default JQM shows the first page in your html file when it starts.  If you don't want the popup to show, make sure a different page is the first one in your file.

J.D. Schuitemaker

unread,
Sep 15, 2012, 8:51:40 AM9/15/12
to phon...@googlegroups.com
Thank you Dave,

I turned out that it works like you described.

Jan D


--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
 
 

Cristina Nardin

unread,
Jun 19, 2015, 5:08:58 PM6/19/15
to phon...@googlegroups.com
Hi sorry but I didnt understand.. How did you solve? What does it mean put a different page as the first one in my file?

Thanks

Jesse Monroy

unread,
Jun 19, 2015, 6:14:52 PM6/19/15
to phon...@googlegroups.com
@Cristina, that post is over two years old. Please start a new thread. This appears to be A JQuery item too, not phonegap.
Reply all
Reply to author
Forward
0 new messages