kthaneer 0 Newbie Poster

Hi Pushkar

Thanks a lot. The script manager works fine.
I have a quick question,

We have a java script function:

function openPickList()
        {
                var iMyWidth;
                var iMyHeight;                
                iMyWidth = (screen.width - 350) / 2;                
                iMyHeight = (screen.height - 200) / 2;
                //Open the window.
                var win = window.open(".............
                win.focus();
                return false;
        }

this opens a new window and we have the focus set to this new window, but when I run this JS from the code behind then I loose the focus of this new browser, please help me in resolving this issue. We need to set the focus to this new pop-up browser

'Code Behind
 ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), "openPickList();", True)

I tried "False" in the script manager but it doesn't work

Please advice

Thanks,
Thaneer


Hi Raja.
Follow this link

When u want to use RegisterStartUpScript within update panel u need to Call function from ScriptManager not from ClientScript...

http://developers.de/blogs/damir_dobric/archive/2007/02/12/RegisterStartupScript-and-RegisterClientScriptBlock-can-work-with-UpdatePanel_3F002100_.aspx

ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), Msg2, True)