I am attempting to use a webdialogwindow to replace an existing javascript alert box. The wdw will just display some text to the user, with an OK button on it. After the user clicks the ok button, I want to continue to navigate to another web page.
My problem is that after I call the wdw to show using the below code:
var diag = $find("diagDateRange").show();
my process is continuing to the next web page and not waiting for the click event that I've added in the page_load event:
btnClose.Attributes.Add(
"onClick", "BLOCKED SCRIPTCloseButtonClick();return false;");
which then calls this:
btnClose is an asp:button that is on the diagDateRange. I do see the diagDateRange pop up on screen for a second. I am already using another wdw in my application to do something similar, but I've got two buttons on it and must make a decision. This wdw stays active on the screen until one of the buttons are clicked; not sure why this one isn't acting the same way. If you need any additional information, please let me know. Thanks so much in advance!
Hi Jamey,
One thing that isn't clear to me is when you need to go to the new page. As far as I can tell, you need to do some javascript processing before you go to the new page. I would recommend setting the window location at the end of your javascript logic:
function buttonClick() { //do work window.location = http://es.infragistics.com;
}
By using that technique, you don't have to actually have the page that you are on post back. If you do need to post back, do a full post back and call Response.Redirect() to navigate to the desired url.
Hope that helps!
Aaron
Aaron,
Thanks for the assistance and the alternative view. Yes, by specifying window.navigate() in my buttonclick function, I was able to go to the new page as I wanted to.
Thanks!