Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

link button

Status
Not open for further replies.

HotBob

Programmer
May 26, 2006
37
GB
Hi there I have a link button in my datagrid and the link button opens up another page such as

Code:
    Private Sub dgStaff_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgStaff.ItemCommand

        Dim sb As New System.Text.StringBuilder(1000)

        With sb
            .Append("<script language = ""javascript"">")
            .Append("window.open('PCReport.aspx?ID=" & e.CommandArgument & "','mywindow','width=530,height=460');")
             .Append("</script>")
        End With

        Page.RegisterClientScriptBlock("OpenCode", sb.ToString)

    End Sub

This window does open but I can't set focus to it?

Any ideas?

Thanks
 
Have a look at the javascript "window.focus" method or ask in the javascript forum for more help.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
This method doesn't work for some reason!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top