asp.net:
You should put the the focus method inside the new window. (The focus method on a page can only refer to the elements on the same page I.e in FAQ.aspx <html><head></head><body onload="window.focus();"></body></html ----- Ollie wrote: ---- I have a popup window displayed when the user clicks on a button in a asp.net. It uses the following code to display the popup window System.Text.StringBuilder sb = new System.Text.StringBuilder() sb.Append("<script language='javascript'>") sb.Append("faq = window.open('") sb.Append(Request.ApplicationPath) sb.Append("/FAQ/FAQ.aspx?FAQ="+"Analysis") sb.Append("','FAQ','menubar=no, toolbar=no, scrollbars=no, resizable=yes status=yes, width=480, height=660, left=50, top=50');") sb.Append("faq.focus();") sb.Append("</script>") Page.RegisterStartupScript("FAQ", sb.ToString()) The problem is that the popup window appears behind the main window, how ca I make it appear in front I am using IE 6... Cheers in advanc Olli
I have a popup window displayed when the user clicks on a button in an asp.net. It uses the following code to display the popup window. System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("<script language='javascript'>"); sb.Append("faq = window.open('"); sb.Append(Request.ApplicationPath); sb.Append("/FAQ/FAQ.aspx?FAQ="+"Analysis"); sb.Append("','FAQ','menubar=no, toolbar=no, scrollbars=no, resizable=yes, status=yes, width=480, height=660, left=50, top=50');"); sb.Append("faq.focus();"); sb.Append("</script>"); Page.RegisterStartupScript("FAQ", sb.ToString()); The problem is that the popup window appears behind the main window, how can I make it appear in front? I am using IE 6.... Cheers in advance Ollie
Don't see what you're looking for? Try a search.
|