PopUp __dopostback
-
Hi everybody. I need some help with a problem. Can anybody say what's wrong with my script? When executing, IE says that there is an error on the line with the __dopostback. I do not have knowledge on javascript, but I copied the code and made it work sometimes. Right now, I'm going crazy with it. Thanks in advance.
<script language="javascript">
var sFeatures='dialogWidth: 500px;dialogHeight: 200px;status:no;scroll:no';
var Resp = window.showModalDialog('PopUpMsg.aspx', window,sFeatures);
if (Resp == True)
{
__doPostBack('btnBorrar','1');
}
</script>It is supposed to show a modal window called PopUpmsg.aspx, where I'll answer Yes or No. That works fine. But after answering, I need to reload the page, and the postback does not seem to work.
-
Hi everybody. I need some help with a problem. Can anybody say what's wrong with my script? When executing, IE says that there is an error on the line with the __dopostback. I do not have knowledge on javascript, but I copied the code and made it work sometimes. Right now, I'm going crazy with it. Thanks in advance.
<script language="javascript">
var sFeatures='dialogWidth: 500px;dialogHeight: 200px;status:no;scroll:no';
var Resp = window.showModalDialog('PopUpMsg.aspx', window,sFeatures);
if (Resp == True)
{
__doPostBack('btnBorrar','1');
}
</script>It is supposed to show a modal window called PopUpmsg.aspx, where I'll answer Yes or No. That works fine. But after answering, I need to reload the page, and the postback does not seem to work.
You should use Page.GetPostBackEventReference. Have a look here, http://weblogs.asp.net/mnolton/archive/2003/06/04/8260.aspx[^]
I know the language. I've read a book. - _Madmatt
-
Hi everybody. I need some help with a problem. Can anybody say what's wrong with my script? When executing, IE says that there is an error on the line with the __dopostback. I do not have knowledge on javascript, but I copied the code and made it work sometimes. Right now, I'm going crazy with it. Thanks in advance.
<script language="javascript">
var sFeatures='dialogWidth: 500px;dialogHeight: 200px;status:no;scroll:no';
var Resp = window.showModalDialog('PopUpMsg.aspx', window,sFeatures);
if (Resp == True)
{
__doPostBack('btnBorrar','1');
}
</script>It is supposed to show a modal window called PopUpmsg.aspx, where I'll answer Yes or No. That works fine. But after answering, I need to reload the page, and the postback does not seem to work.
garfield185 wrote:
if (Resp == True)
should be
if (Resp == true)