I have a button on my main page that opens up a new window. It is generated using jsgrid and this is the function that is called when the button is clicked:
The relevant parts are: Url.Action("Subwindow", "PopulationDetails" which calls a controller and this: window.open(actionUrl, "_blank", "width=1400, height=700"); which open up the new window.
The problem I have, is that the url of the new window is (localhost)/umbraco/Surface/PopulationDetails/Subwindow, but I need it to be (localhost)/portal/condition-monitoring/population-details-subwindow. How can I control that? Do I manually change the url or is there a better way? Here's the controller that returns the view for the new window:
public ActionResult Subwindow(
Guid populationId,
string serialNo,
Guid accountId,
string diagnosticKey,
string ownerId,
DateTime faultDate,
string faultDesc,
int alertType,
string url,
string sosStatus = "") {
int sosAlertPriority = 0;
if (sosStatus != ""){
switch (sosStatus){
case "AR":
sosAlertPriority = 3;
break;
case "MC":
sosAlertPriority = 2;
break;
case "NAR":
sosAlertPriority = 1;
break;
}
} ...
...
var model = new CmAlertViewModel
{
Population = populationId,
SerialNo = serialNo,
AccountId = accountId,
AlertName = alertName,
AlertPriority = alertPriority,
OwnerId = Guid.Parse(ownerId),
FaultDate = faultDate,
FaultDescription = faultDesc,
PortalURL = url,
AlertType = alertType
};
return View("~/Views/PopulationDetailsSubwindow.cshtml", model);}
Also, I checked the content of the PortalURL when the new window is opening using a debugger and the url is correct (the one I want the new window to open into)
Opening a subpage on a new window
I have a button on my main page that opens up a new window. It is generated using jsgrid and this is the function that is called when the button is clicked:
The relevant parts are:
Url.Action("Subwindow", "PopulationDetails"
which calls a controller and this:window.open(actionUrl, "_blank", "width=1400, height=700");
which open up the new window. The problem I have, is that the url of the new window is(localhost)/umbraco/Surface/PopulationDetails/Subwindow
, but I need it to be(localhost)/portal/condition-monitoring/population-details-subwindow
. How can I control that? Do I manually change the url or is there a better way? Here's the controller that returns the view for the new window:Also, I checked the content of the PortalURL when the new window is opening using a debugger and the url is correct (the one I want the new window to open into)
is working on a reply...