Reputation: 172
I have 2 pages page1.html and page2.php. I am sending user information (GET) like page2.php?new_user=true
. In page 2 the first page has id="Welcome
". In page2.php I am redirecting the request to a <div datarole="page" > with id="NewUser"
(inside page2.php). I am using javascript to do this $isnew= '<?php echo $_GET["new_user"]; ?>';
. Currently I am redirecting using an if condition
if($isnew=="true")
{
window.location.href="#NewUser"
}
The problem is I want to display #NewUser as a dialog and NOT a page. Can anyone give any other possible solution to this?
Thanks in advance.
Upvotes: 0
Views: 1154
Reputation: 31732
To show a page as a dialog:
$.mobile.changePage('#NewUser', { role:'dialog'});
jQuery Mobile API - Dialog Widget
Upvotes: 1