Hi All,

I'm facing an issue with ASP.NET Web Application (using .NET Framework 3.5).

I've a aspx page called Enrollment that contains a user control named InlineProviderSearch.ascx. The user control will basically be used for searching provider information based on some criteria input by the user. Now the user control contains two div tags (one named dvCity and another dvNotification). On click of the Search button, I call a Web Service passing the city name or zip code, radius (in miles), lastname/firstname. Based on these parameters, the WS returns a list of city. Now if there is a exact match, then search result based on that city will returned else the div tag (dvCity) needs to be popped up like a floating div. This will show a list of cities from which user can select a particular city.

Now when the div pops up the screen should be grayed out and only the div shall be visible like a modal popup. I have tried using Jquery to do so but the background doesn't grey out. Also I've used Ajax ModalPopupExtender control that works fine here but I need to use the Jquery since that is the client's approach. Below is the code snippet:
<script type="text/javascript">
function cityPopUp() {
$.blockUI({ message: $('#<%=dvCity.ClientID%>'), css: { width: '500px', height: '120px', top: '25%', left: '25%'} });
return false;
}

function confirmationPopUp() {
$.blockUI({ message: $('#dvNotification'), css: { width: '500px', height: '120px', top: '25%', left: '25%'} });
return false;
}

$(document).ready(function () {
$('#btnConfirm').click(function () {
$.unblockUI();
return true;
});

$('#btnCancel').click(function () {
$.unblockUI();
return false;
});


});
</script>

Also for the confirmaton popup (showing the dvNotification div), the jquery doesn't work at all. I get a Javascript error as below:
Microsoft Jscript RuntimeError: The object doesn't support this property or method.
This error occurs when the blockUI is called. This happens for both the div tags (dvCity and dvNotification).

Can someone let me know how one can use Jquery to display modal popups (like floating divs) with the background grayed out?

Thanks,
Debsoft