PDA

View Full Version : pass data to new window


bindu
12-06-2002, 05:16 PM
I want to open a new window when a user enters some data and clicks a button on the current window. I used the window.open() in the onclick event of the button to open the new window. I already used session variables to store and pass the data that the user entered, but the problem is it works fine for the first time. Later on when I tried by entering a different value, it still shows the old value in the new window. Actually i have written code to change the value of the sessionvariable, when a user enters a new value and i gets the correct result (new value of the session variable) in the old window. From that page only i clicks a button to open the new window still it shows the old value.

whammy
12-07-2002, 12:29 AM
Can we see the code you're using? Sounds like you're not updating the variable being passed to the popup window...

bindu
12-09-2002, 04:14 PM
here is the code.
<%
if session("OcsReferId") <> "" then
Session("OcsReferId") = ""
end if


If Request.form("ocsreferal") <> "" then
Session("OcsReferId") = Request.Form("ocsreferal")

else
Response.Redirect("case-dump.asp")
end if
%>

glenngv
12-10-2002, 07:07 AM
is that the code for the new window?
can you also post the code for the parent window?

whammy
12-10-2002, 07:13 AM
Yes, it sounds like you aren't updating the client-side javascript with the correct server-side parameters before you send them to the client...

Let's see the page (and the code on it) that opens the window.

bindu
12-10-2002, 05:13 PM
no, it's the code in the parent window which i used to overwrite the previous session value and it works fine in the parent window.from that page only i clicks a button to open the new window (that too after rewriting the session value) still it was showing the previous value.

glenngv
12-11-2002, 02:06 AM
can you post the important codes for the parent and popup windows?