Modal form

  • Thread starter Thread starter Mark Goldin
  • Start date Start date
For IE, using window.showModalDialog() will create a dialog that is modal to
that specific IE browser window.

Dale
 
How do I execute that code on a server side?
DalePres said:
For IE, using window.showModalDialog() will create a dialog that is modal to
that specific IE browser window.

Dale
 
You cannot execute that code from server side. Server code is not allowed to
open new IE window on the client (otherwise, the bad guys would make their
web site keep poping up new windows until the client computer crach). You do
it through client side script.

Say, you have a button (server control) on the page, on Pare_Load event
handler, you can attach client script like this:


btnOpenDialog.Attribute.Add("onclick","window.showModalDialog('MyDialogPage.
html')");
Or
btnOpenDialog.Attribute.Add("onclick","OpenMyDialog()");

Of course in latter case, you need to write a javascript functioncalled
OpenMyDialog() in the page's HTML source.
 
Back
Top