I'm trying to create a new ID from a modal pop-up then close the radwindow and redirect to a page using the ID that was just created. I'm having a tough time trying to get this to work, can someone take a look and see if they know what I am doing wrong? I've spent hours on Google trying to find a solution, but nothing I find is of any help to me.
//this happens when the save button inside the radwindow gets clicked
var pid = post.ID;
this.AddClientScript("CloseAndRedirect(pid)"); // pass the parent ID into the javascript function
//this function is in the Window.Master file where all radwindow functions are kept
function CloseAndRedirect(pid) {
GetRadWindow().BrowserWindow.location.href = ("/Blog/Post-Maintenance.aspx?id=" + pid);
GetRadWindow().Close();
}
I just need to be able to add pid to the javascript function call so it can pass that variable to the new page that opens. With this code, I end up at a page with ?id=pid at the end of the URL. I'm not the best with javascript, but I tried adding '' and "" around the variable and just get a syntax error.
Thanks in advance for not judging my abilites. :)