Executing javascript uisng Response.Write() method doens't work properly as in IE6
Hi,
I use to open the modal dialog in Button_Click event.
Dim objSelectedAsNew Microsoft.Web.UI.WebControls.TreeNodeobjSelected = objTree.GetNodeFromIndex(objTree.SelectedNodeIndex)
Dim NodeTypeAsInteger = GetItemType(objSelected.NodeData)SelectCase (NodeType)Case ITEM_TYPE.FILE'open the EditFile.aspxLJscript.Text = "<script language='javascript'>"
LJscript.Text += "window.showModalDialog('EditFile.aspx', window, 'dialogHeight:600px;dialogWidth:600px;center:Yes;help:No;resizable:No;status:No;toolbar:No;menubar:No;dialogLeft:300;dialogTop:300');"
LJscript.Text += "</script>"
Response.Write(LJscript.Text)
CaseElse'open Edit.aspx'open the EditFile.aspxLJscript.Text = "<script>"
LJscript.Text += "window.showModalDialog('Edit.aspx', window, 'dialogHeight:400px;dialogWidth:400px;center:Yes;help:No;resizable:No;status:No;toolbar:No;menubar:No;dialogLeft:300;dialogTop:300');"
LJscript.Text += "</script>"
Response.Write(LJscript.Text)
EndSelectBefore popping up the window, I checked some conditions. Based on the result , I opened the pop-up window. ( eg: if result is A, then pop-up window A, if result is B then pop-up window B)
The problem is the windows gets popped up but when I move that dialog window, then the screens leaves with the shades as I move the dialog window on the screen.
If don't use Response.Write() method to executed javascript, then it's workig fine.
Register the script block and then add 'onclick' attributes and call the javascript is working fine.
But I need to check some condidtion before popping up the window.
Are there any work arounds for this?
Thanks.

