-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: SureshScribnar
Message 3 in Discussion
Hi Guys, A problem possibly has multiple solutions. Here is mine. Lets consider that
allover your application you want to some aspx pages in Modal dialog. As we know, when
we open any aspx in Modal dialog and when the postback happens it opens a new window.
We can do the following to overcome this. 1 . Create a html page called
OpenDialog.htm in which add this script. Add an iframe to the page and set its id
to"inframe". <script language="javascript">
function window_onload()
{
if(window.dialogArguments.url!= null)
document.frames["inframe"].location.href = window.dialogArguments.url;
else alert('The page to be opened has to be passed.');
}
</script> The above function should be called on the onload event of the document.
2. When you want to open any aspx file in a modal dialog hereafter, all that you
will have to do is to open the Modal Dialog with first parameter as the html file you
have created. And the second parameter should be an object which has a property with
name "url" and the value for this property should be the link that you want to open in
the Modal Dialog. Lets say you want to open a url "TestModal.aspx?param1=234", when
a link is clicked. Considering that we call a javascript function to open it, the code
you would write would be somthing similar to the following.
function opendialog(url)
{
var obj = new Object();
obj.url= url;
window.showModalDialog("OpenDialog.htm",obj,"dialogWidth:200px;dialogHeight:300px;");
} Good luck! Suresh Kumar R
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]