I have given my code below,
$(function() {
$("get-reservation-id").click(function() {
$(this).load("<%=Url.Action("GetReservation", "ModalPopup") %>",
function() {
$("<div>").dialogr({
autoOpen: false,
width: 700,
title: 'Car Rental Application',
modal: true,
overlay: {
opacity: 0.5,
background: "black"
}
});
});
});
});
This code does not produce a jquery ui dialog pop up.
get-reservation-id : is the is given to an image placed within an anchor tag
GetReservation : is the partial view
ModalPopop : is the name of the controller(Where I have an action that returns GetReservation View)
Any Idea Why this does not work. On the other hand I Have written some code which does work. See Below
Working code:
$("#vehicle-search-id").click(function() {
$("#vehicle-search-id").load("/ModalPopup/VehicleSearch",
function() {
$("#vehicle-search").dialogr({
width: 700,
modal: false,
title: 'Car Rental Application'
});
});
});
The reason why I chose to not use this is because I wanted to use <%=Url.Action("GetReservation", "ModalPopup") %> instead of /ModalPopup/VehicleSearch and wanted to use a more common $("<div>").dialogr({ than $("#vehicle-search").dialogr({
Many Thanks
My Aim
I want to create a pop up using a Jquery dialog and put a partial view in it.