Pop up window

williamLOR

Member
Joined
Aug 3, 2005
Messages
9
Programming Experience
Beginner
Hey guys,

Firstly, abc form is the form where i use to do get employee details.To get employee details, i need to click one button and it will pop up EmployeeDetails window form using javascript.In the pop up window, i do searching and all the value fill in datagrid.Afterthat,I click 'select' and it will response.redirect("abc.aspx") back to abc form.
The problem is here. It create a new form called abc and all the value pass to new abc form. If correct, it should pass to my original abc form not that new abc form. WHY?

abc form
i add this javascript
function popup(url)
{
mywindow=window.open(url,"Window","height = 850, width = 800, resizable = 0,scrollbars=yes" );
window.close
}

Private Sub btnclick_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclick.Click

btnclick.Attributes.Add("onclick", "popup('EmployeeDetails.aspx')")

End Sub




EmployeeDetails form

Private Sub DGApproval1_ItemCommand1(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DGApproval1.ItemCommand
If e.CommandName = "Select" Then
Session("ID") = DGApproval1.Items(e.Item.ItemIndex).Cells(0).Text
Session("Name") = DGApproval1.Items(e.Item.ItemIndex).Cells(1).Text
Session("Department") = DGApproval1.Items(e.Item.ItemIndex).Cells(2).Text
Session("Branch") = DGApproval1.Items(e.Item.ItemIndex).Cells(3).Text
Session("Subsidiary") = DGApproval1.Items(e.Item.ItemIndex).Cells(4).Text
Response.Redirect("abc.aspx")
End If
End Sub


If somebody can't understand what am i writing . just comment it. I will explaint in more details. hopefully , all can help me solve this problem.
thanks.

sharing is power knowledge.:)
 
Back
Top