getting problem in model window
-
Hi all, I am using this code on aspx page from where i open model window: function AddValue(Param) { var winSettings = 'center=yes,left=150px,top=150px,status=yes,scrollbars=yes,resizable=yes,width=300,height=300'; var Status=window.showModalDialog('/Scheduling/View/DataInput/AddPopup.aspx?Key='+Param,'',winSettings); document.getElementById('ctl00_CPHMain_hdnCheck').value=Status; document.getElementById('ctl00_CPHMain_hdnKey').value=Param; if(Status==1) { return true; } else { return false; } } and using this code on model window: function CloseWindow(returnValue) { window.returnValue =returnValue; window.close(); } calling this function for returning value while closing window:
Now problem is that when i click on image which is use for cancel then it close with return value 0 but at the time of saving when i click on image button for saving its looks llkes as other window is open and close after saving but this model window remains same. On mozilla its working well but on ie7 i m getting this problem
-
Hi all, I am using this code on aspx page from where i open model window: function AddValue(Param) { var winSettings = 'center=yes,left=150px,top=150px,status=yes,scrollbars=yes,resizable=yes,width=300,height=300'; var Status=window.showModalDialog('/Scheduling/View/DataInput/AddPopup.aspx?Key='+Param,'',winSettings); document.getElementById('ctl00_CPHMain_hdnCheck').value=Status; document.getElementById('ctl00_CPHMain_hdnKey').value=Param; if(Status==1) { return true; } else { return false; } } and using this code on model window: function CloseWindow(returnValue) { window.returnValue =returnValue; window.close(); } calling this function for returning value while closing window:
Now problem is that when i click on image which is use for cancel then it close with return value 0 but at the time of saving when i click on image button for saving its looks llkes as other window is open and close after saving but this model window remains same. On mozilla its working well but on ie7 i m getting this problem
That's because you are doing a postback in a modal window. (That's "modal", not "model"...) You can't post a form to a modal window, that is why it opens in a new window. If you want a modal window and want to make a postback, open a frameset page in the modal window that contains a frame that opens the page. That of course means that the returnValue property is in the frameset page, i.e. the parent of the page in the frame.
Despite everything, the person most likely to be fooling you next is yourself.
-
That's because you are doing a postback in a modal window. (That's "modal", not "model"...) You can't post a form to a modal window, that is why it opens in a new window. If you want a modal window and want to make a postback, open a frameset page in the modal window that contains a frame that opens the page. That of course means that the returnValue property is in the frameset page, i.e. the parent of the page in the frame.
Despite everything, the person most likely to be fooling you next is yourself.
-
I don't know, I have actually never tried a modal window in Mozilla. They probably just didn't set that limitation on modal windows.
Despite everything, the person most likely to be fooling you next is yourself.
-
I don't know, I have actually never tried a modal window in Mozilla. They probably just didn't set that limitation on modal windows.
Despite everything, the person most likely to be fooling you next is yourself.
-
Hi , Could u pls help me for one more issue,when i am using iframe,i am not able to updating its properties like y code is: but still its giving scrolling
What about height ?
cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net
-
What about height ?
cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net