I'm new to JS and jQuery. Actually, I'm working on my first project right now.
I'm using the latest versions of jQuery, jQueryUI and jQuery Mobile. My page works fine in IE 9, but not in IE 10, Chrome or Firefox. The main problem is that the 'X' close button does not close the dialog. The URL updates (the "#dialogPage" is removed) but the dialog remains open.
The 2nd half of my problem is that the button I configured in my dialog does not appear in any browser.
Here is my code for the dialog page (this is in the same html page as my main page code, in case that matters):
<div data-role="page" id="dialogPage" class="type-home">
<header>
<script type="text/javascript">
$(function () {
$("#dialogPage").dialog({
resizable: false,
modal: true,
buttons: {
"Ok": function () {
$(this).dialog("close");
}
}
});
});
</script>
<div data-role="header">
<h2 id="txTitle"></h2>
</div>
</header>
<div data-role="content">
<h3 id="txMessage"></h3>
</div>
I call this page from a function that calls a WCF service to get data. The line that calls this page is:
$.mobile.changePage('#dialogPage');
I've searched all over SO and Google and tried every solution suggested. Nothing has worked.
Ideally, I want to hide the default 'X' close button and just have an "Ok" button that closes the dialog. At this point though I'll be happy just to get the 'X' button to work in all browsers.