I am trying to load html page inside jquery dialog but it does not work. below is my jquery code. "openTerms" function is triggered when there is click in link. it opens up the dialog but give me resource not found error. however "terms.html" reside in the project and added as item.
<a id="someclientid" name="someuniqueid" href="javascript:void(0);" onclick="openTerms();">Terms and Conditions</a>
<script>
function openTerms()
{
pathArray = location.href.split( '/' );
protocol = pathArray[0];
host = pathArray[2];
url = pathArray[0] + '//' + pathArray[1] + '//' + pathArray[2] + '//' + pathArray[3]
url = url + "/Orchard.Club" + "/terms.html";
var page = url;
alert(url);
var $dialog = $('<div></div>')
.html('<iframe style="border: 0px; " src="' + page + '" width="100%" height="100%"></iframe>')
.dialog({
autoOpen: false,
modal: true,
height: 700,
width: 1100,
title: "Terms and Conditions",
buttons: {
Cancel: function () {
$(this).dialog("close");
}
},
close: function () { setFormControls(); },
open: function () {
}
});
$dialog.dialog('open');
}
</script>
}