T
Terry
hi, could any1 help me with this?
[It's a ".aspx" page.]
There're one button and one textbox on Page A.
click the button:
<Code Behind >
Dim ClientScript As String = ""
ClientScript += " <SCRIPT language='javascript'> " & vbCrLf
ClientScript += "var features =" & ...........<--setup
height,width...etc
ClientScript += "window.open(B.aspx,'',features);" & vbCrLf
ClientScript += " </SCRIPT> "
If Not Me.IsClientScriptBlockRegistered("VBScript") Then
Me.RegisterClientScriptBlock("VBScript", ClientScript)
End If
End Sub
The above JavaScript will open B.aspx in a new window; There're
several controls and a "Submit" button on Page B. Users could click
"Submit" button and pass all information generate on Page B to Page A.
Click the "Submit" button:
Dim clientJavaScript As String
clientJavaScript += " <SCRIPT language='javascript'> " & vbCrLf
clientJavaScript &= " window.opener.Form1.textbox1.value = '" &
(whatever value) & "';" & vbCrLf
clientJavaScript &= " window.close(); " & vbCrLf
clientJavaScript &= "</script>"
Response.Write(clientJavaScript)
This will pass the value to textbox1 on Page A, and also close Page B
(itself).
I have to done this without any session or cookie, and the code shows
above just done what I want EXCEPT.....I need the textbox (which
receive the data) on Page A to be invisible. I tried to set the
textbox <visible=false>, then the server will not render that textbox.
So I tried a <input type=hidden ID=hiddentxt name=hiddentxt>, and this
won't work also. Anyone can help me?
[It's a ".aspx" page.]
There're one button and one textbox on Page A.
click the button:
<Code Behind >
Dim ClientScript As String = ""
ClientScript += " <SCRIPT language='javascript'> " & vbCrLf
ClientScript += "var features =" & ...........<--setup
height,width...etc
ClientScript += "window.open(B.aspx,'',features);" & vbCrLf
ClientScript += " </SCRIPT> "
If Not Me.IsClientScriptBlockRegistered("VBScript") Then
Me.RegisterClientScriptBlock("VBScript", ClientScript)
End If
End Sub
The above JavaScript will open B.aspx in a new window; There're
several controls and a "Submit" button on Page B. Users could click
"Submit" button and pass all information generate on Page B to Page A.
Click the "Submit" button:
Dim clientJavaScript As String
clientJavaScript += " <SCRIPT language='javascript'> " & vbCrLf
clientJavaScript &= " window.opener.Form1.textbox1.value = '" &
(whatever value) & "';" & vbCrLf
clientJavaScript &= " window.close(); " & vbCrLf
clientJavaScript &= "</script>"
Response.Write(clientJavaScript)
This will pass the value to textbox1 on Page A, and also close Page B
(itself).
I have to done this without any session or cookie, and the code shows
above just done what I want EXCEPT.....I need the textbox (which
receive the data) on Page A to be invisible. I tried to set the
textbox <visible=false>, then the server will not render that textbox.
So I tried a <input type=hidden ID=hiddentxt name=hiddentxt>, and this
won't work also. Anyone can help me?