G
Guest
Dear all,
I have a web form which opens a new window when a button is clicked . I use
java
script to open a new window. In this window I have several text boxes in
which a
user fills his details and presses save button.when a save button is pressed
the data
is inserted in the database and New window closes.
I have written the following code in the NEW WINDOW:
btnAdd_Clicked ()
(Insertion takes place over here)
Response.Write("<script
language='javascript'>window.opener.document.forms(0).submit();</script>")
Response.Write("<script language='javascript'>window.close();</script>")
which means that the Main window must display the recent data entered in the
database which it does smoothly.Now I have a dropdownbox on the Main window
which lists the ID numbers of all the users.and have a search button which
upon pressing searches the records of the user which is selected in the
dropdown box.
The problem is that when a new user is entered from the pop up window I can
see
his ID in the dropdown box but cannot search anything based on his ID. If I
press search button it searches the record of the first person and not the
most
recent added person. I know that this is happening because of POSTBACK .But
I dont know how to call a POSTBACK method from a new window into the MAIN
window. I dont know but can we call the POSTBACK method after the above 2
lines of code in the btnAdd of new window.
I am really confused please help me in this case.
Any help much appreciated.
cheers,
Sunil Sabir
I have a web form which opens a new window when a button is clicked . I use
java
script to open a new window. In this window I have several text boxes in
which a
user fills his details and presses save button.when a save button is pressed
the data
is inserted in the database and New window closes.
I have written the following code in the NEW WINDOW:
btnAdd_Clicked ()
(Insertion takes place over here)
Response.Write("<script
language='javascript'>window.opener.document.forms(0).submit();</script>")
Response.Write("<script language='javascript'>window.close();</script>")
which means that the Main window must display the recent data entered in the
database which it does smoothly.Now I have a dropdownbox on the Main window
which lists the ID numbers of all the users.and have a search button which
upon pressing searches the records of the user which is selected in the
dropdown box.
The problem is that when a new user is entered from the pop up window I can
see
his ID in the dropdown box but cannot search anything based on his ID. If I
press search button it searches the record of the first person and not the
most
recent added person. I know that this is happening because of POSTBACK .But
I dont know how to call a POSTBACK method from a new window into the MAIN
window. I dont know but can we call the POSTBACK method after the above 2
lines of code in the btnAdd of new window.
I am really confused please help me in this case.
Any help much appreciated.
cheers,
Sunil Sabir